10060, 'Operation timed out'

Steve Holden steve at holdenweb.com
Wed Jan 18 09:17:40 EST 2006


Sumit Acharya wrote:
> After 20 seconds only.
> 
Of course I now realise there's no default timeout on sockets anyway, so 
that likely wasn't the problem.

Which statement is failing?

You would actually get much more information without the try/except 
clauses, as they are stopping the traceback from being printed - if the 
error is occurring deep in the ftplib you will actually see "what and 
where" with a full traceback. Your loop should read:

for x in range(1000):
     ftp = FTP()
     ftp.connect(host,port)
     ftp.login('a','a')
     print ftp.sendcmd('pass x')
     ftp.close()

Try running the script without both try/excepts and then post the full 
traceback, please. You can forget about the timings for now. It may well 
be an FTP server loading issue, but a traceback will give more information.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list