ftplib: Software caused connection abort, how I solved it
Mad Sweeney
madsweeney at eircom.net
Sun Jun 12 08:36:54 EDT 2011
My program polls FTP servers at intervals for jobs to process.
Its running as a service on Windows server 2000 or 2003 :-(.
About 13% of times the retrbinary and less often the nlst calls would fail
with
"Software caused connection abort".
I could find no relevant solution on the intertubes.
I added blocksize=2048 to the retrbinary call which lowerd the failures to
about 2% but that was still unsatisfactory for me.
When I added:
socket.setdefaulttimeout(60)
to the setup stuff in order to solve a different problem, the connection
abort errors went away completely.
Even when I restored retrbinary to use the default blocksize it still
worked.
HTH
More information about the Python-list
mailing list