This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nagle
Recipients nagle
Date 2013-09-02.18:18:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378145931.18.0.826598432393.issue18907@psf.upfronthosting.co.za>
In-reply-to
Content
urllib2.open for an FTP url does not obey the timeout parameter.

Attached test program times out on FTP open after 21 seconds, even though the specified timeout is 60 seconds.  Timing is consistent; times have ranged from 21.03 to 21.05 seconds. Python documentation (http://docs.python.org/2/library/urllib2.html) says "The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). This actually only works for HTTP, HTTPS and FTP connections."  The documentation for Python 3 reads the same.

Open of ftp://ftp.sec.gov/edgar/daily-index failed after 21.05 seconds: <urlopen error ftp error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

This was on Windows 7, but the same result is observed on Linux.  

(The FTP server at the U.S. Securities and Exchange Commission is now imposing a 20-second connection delay during busy periods.  This is causing our Python code that retrieves new SEC filings to fail.  It may be necessary to run the program at different times of the day to reproduce the problem.)
History
Date User Action Args
2013-09-02 18:18:51naglesetrecipients: + nagle
2013-09-02 18:18:51naglesetmessageid: <1378145931.18.0.826598432393.issue18907@psf.upfronthosting.co.za>
2013-09-02 18:18:51naglelinkissue18907 messages
2013-09-02 18:18:50naglecreate