[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: I'm closing, since it's amlost certainly an OS-X bug (similar to time-wit socket exhaustion & Co). -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-04-09 Thread Ronald Oussoren
Ronald Oussoren added the comment: This could be related to a problem described on this blog: As such this appears to be a platform issue and not a python one. -- ___ Python tracker

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-26 Thread Ned Deily
Ned Deily added the comment: I believe Ronald's suggestion to disable calls to _scproxy doesn't quite work. Please try this instead: env no_proxy='*' python -m SimpleHTTPServer -- ___ Python tracker

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-26 Thread Parto Chobeiry
Parto Chobeiry added the comment: Got feedback from Apple :-( Engineering has determined that this is an issue for a third party to resolve based on the following: This happens in stock python, it's a python issue. We are now closing this bug report. If you have questions regarding the r

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-26 Thread Parto Chobeiry
Parto Chobeiry added the comment: @neologix: I tried to patch socketserver.py from versions 2.7, 3.3 and 3.4 -- it fails all the time, slightly differing error messages but similar to this: u1@~/Projects$ patch <../Downloads/socketserver_use_selectors-1.diff can't find file to patch at input

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: You could trace using dtruss (as root), which behaves similarly to strace. What happens when you first set "http_proxy" in the environment: $ env http_proxy= python -m SimpleHTTPServer If that doesn't cause problems the hang is caused by the _scproxy extensio

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Charles-François Natali
Charles-François Natali added the comment: By the way, could you test with the patch available in issue #21040 ? It'll use poll() instead of select(): I don't think it'll fix your problem, but it'll be a nice test anyway :-) -- ___ Python tracker

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Charles-François Natali
Charles-François Natali added the comment: You could use tcpdump to see what's going on (does the server reply to SYN?). Note that it might very well be either a firewall setting, or a DoS protection (some sort of backoff when there are too many SYN within a short interval). -- nosy: +

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Parto Chobeiry
Parto Chobeiry added the comment: Submitted a bug at bugreport.apple.com: #16401766 -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: If it blocks in the select() call, then it's probably an OS issue rather than a Python issue. -- ___ Python tracker ___ ___

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Parto Chobeiry
Parto Chobeiry added the comment: I think there is no need for print() -- it is hanging <>: def _eintr_retry(func, *args): """restart a system call interrupted by EINTR""" while True: try: return func(*args) <> except OSError as e: if e.errn

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Parto Chobeiry
Parto Chobeiry added the comment: I thought you were kidding concerning "print()" -- thus I started using "python -m trace -t httpd.py" >trace 2>&1. The hanging does not occur when tracing (however, things slow down immensely naturally)! When breaking the httpd.py while it is not serving anymo

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > How do I trace in MacOSX? No truss or strace available... Add print() statements to the Python stdlib code :-) -- ___ Python tracker ___

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Parto Chobeiry
Parto Chobeiry added the comment: TCP ports are available - did the following while running "ab" against "python3.4 -m http.server": u1@~$ while true; do netstat -an|grep tcp|wc; sleep 1; done 50 3003950 50 3003950 50 3003950 50 3003950

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Intuitively: no TCP ports available left? Have you tried connecting from another client when the hang happens? Have you tried tracing what happens in the server? (is the incoming connection accepted?) -- nosy: +ned.deily, pitrou ___

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-23 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> ronaldoussoren components: +Macintosh nosy: +ronaldoussoren ___ Python tracker ___ ___ P