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/ -- http://mail.python.org/mailman/listinfo/python-list