Question:
Does a socket connection timeout after several hours in python?
?
2011-03-21 07:42:44 UTC
I am writing a piece of software that creates a socket to a server, logs on, then (is supposed to) run for several days sequentially updating a series of devices I have associated with the server (the details aren't important). After about three to four hours of everything going swimmingly, I begin getting this error every time my program attempts to send a request:


Then the next time my program retries, I get this one:


And that repeats as long as I continue to try updating.

Is there something I don't know about, or does this sound like a server-side problem? Thanks in advance!
Three answers:
Jack Trades
2011-03-21 09:54:09 UTC
I highly doubt you are going to get help with this here. I did a quick Google search for your problem and it would seem that it is a problem with the Windows socket not having enough space on the queue. Here's a quote from a forum...



"Yes I could observe this error some time ago.

It is not related to Python but it is rather a Windows Sockets error.

Searching the google I have found this description of the error message:

http://support.ipswitch.com/kb/WSK-19980702-EM02.htm

Try to use a sniffer like Ethereal and see what packets

are sent and received from the network."



You may want to try the Python forums for questions like this (comp.lang.python or the mailing list here http://mail.python.org/mailman/listinfo/python-list).



You should read through some of the questions/answers for this Google search. This may point you in the right direction...



http://www.google.com/search?client=ubuntu&channel=fs&q=urlopen+error+%2810053%2C+%27Software+caused+connection+abort%27%29&ie=utf-8&oe=utf-8
Zarn
2011-03-24 02:00:21 UTC
You could try adding a "still alive" heartbeat to your protocol, though I'd imagine it would be better to reconnect every time in order to handle changes in network topology, especially if this is through the Internet rather than through a local (stable) network. Same goes if one or both computers use wifi, I'd imagine.
?
2017-01-13 18:16:16 UTC
confident, this "old guy" likes Monty Python. you may not think of how truly lame the shows that pass for comedy on television at the instant are, after observing Python and the 1st few years of Saturday evening stay.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...