socket programming
Helge Aksdal
helge at aksdal.net
Wed Jul 20 09:38:36 EDT 2005
* gry at ll.mit.edu <gry at ll.mit.edu> [2005/07/20 15:26]:
> What I have done in similar circumstances is put in a random sleep
> between connections to fool the server's load manager. Something like:
>
> .import time
> .min_pause,max_pause = (5.0, 10.0) #seconds
> .while True:
> . time.sleep(random.uniform(min_pause, max_pause))
> . do_connection_and_query_stuff()
>
> It works for me. Just play with the pause parameters until it fails
> and add a little.
thanks for the tip. i'll give that a shot.
--
Helge Aksdal
More information about the Python-list
mailing list