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

Parto Chobeiry report at bugs.python.org
Fri Mar 28 20:11:23 CET 2014


Parto Chobeiry added the comment:

dtruss yields this when the pause at 16.300+ requests occurs:

 67677/0x23c1df:  12960942       3      1  stat64("/Users/u1/SparkleShare\0", 0x7FFF5C5ED540, 0x103713A60)		 = 0 0
 67677/0x23c1df:  12960946       3      1 lstat64("/Users/u1/SparkleShare\0", 0x7FFF5C5ED540, 0x103713A60)		 = 0 0
 67677/0x23c1df:  12960969       6      3 write_nocancel(0x2, "127.0.0.1 - - [28/Mar/2014 20:05:04] \"GET / HTTP/1.0\" 200 -\n\0", 0x3C)		 = 60 0
 67677/0x23c1df:  12960990      12      9 sendto(0x6, 0x103B61EC4, 0x11)		 = 17 0
 67677/0x23c1df:  12961005       7      5 sendto(0x6, 0x103B533C4, 0x25)		 = 37 0
 67677/0x23c1df:  12961025       6      4 sendto(0x6, 0x103B533C4, 0x25)		 = 37 0
 67677/0x23c1df:  12961034       4      2 sendto(0x6, 0x103B533C4, 0x28)		 = 40 0
 67677/0x23c1df:  12961047       8      6 sendto(0x6, 0x103B60554, 0x16)		 = 22 0
 67677/0x23c1df:  12961057       6      4 sendto(0x6, 0x1038D42FC, 0x2)		 = 2 0
 67677/0x23c1df:  12961072       7      5 sendto(0x6, 0x7F8902801824, 0x688)		 = 1672 0
 67677/0x23c1df:  12961092       6      3 shutdown(0x6, 0x1, 0x10364FE30)		 = 0 0
 67677/0x23c1df:  12961099       5      3 close(0x6)		 = 0 0
 dtrace: 55723 dynamic variable drops with non-empty dirty list
 67677/0x23c1df:  13631099  501078     11 select(0x4, 0x7FFF5C5E2900, 0x7FFF5C5E2880, 0x7FFF5C5E2800, 0x7FFF5C5E27F0)		 = 0 0
 67677/0x23c1df:  13631152  500202     17 select(0x4, 0x7FFF5C5E2900, 0x7FFF5C5E2880, 0x7FFF5C5E2800, 0x7FFF5C5E27F0)		 = 0 0
 67677/0x23c1df:  13631239  501182     42 select(0x4, 0x7FFF5C5E2900, 0x7FFF5C5E2880, 0x7FFF5C5E2800, 0x7FFF5C5E27F0)		 = 0 0
 67677/0x23c1df:  13631312  501123     29 select(0x4, 0x7FFF5C5E2900, 0x7FFF5C5E2880, 0x7FFF5C5E2800, 0x7FFF5C5E27F0)		 = 0 0
 67677/0x23c1df:  13631453  501291     56 select(0x4, 0x7FFF5C5E2900, 0x7FFF5C5E2880, 0x7FFF5C5E2800, 0x7FFF5C5E27F0)		 = 0 0

However, when dtrussing the python process, it pauses at 16.300+ requests and then *continues*!!

 u1@~/Projects$ ab -n 20000 http://127.0.0.1:8000/

 This is ApacheBench, Version 2.3 <$Revision: 655654 $>
 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
 Licensed to The Apache Software Foundation, http://www.apache.org/

 Benchmarking 127.0.0.1 (be patient)
 Completed 2000 requests
 Completed 4000 requests
 Completed 6000 requests
 Completed 8000 requests
 Completed 10000 requests
 Completed 12000 requests
 Completed 14000 requests
 Completed 16000 requests
 Completed 18000 requests
 Completed 20000 requests
 Finished 20000 requests


 Server Software:        SimpleHTTP/0.6
 Server Hostname:        127.0.0.1
 Server Port:            8000

 Document Path:          /
 Document Length:        1672 bytes

 Concurrency Level:      1
 Time taken for tests:   42.930 seconds
 Complete requests:      20000
 Failed requests:        0
 Write errors:           0
 Total transferred:      36540000 bytes
 HTML transferred:       33440000 bytes
 Requests per second:    465.87 [#/sec] (mean)
 Time per request:       2.147 [ms] (mean)
 Time per request:       2.147 [ms] (mean, across all concurrent requests)
 Transfer rate:          831.20 [Kbytes/sec] received

 Connection Times (ms)
               min  mean[+/-sd] median   max
 Connect:        0    1 139.1      0   19666
 Processing:     1    1   4.2      1     538
 Waiting:        1    1   1.6      1     154
 Total:          1    2 139.1      1   19668

 Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      2
  98%      2
  99%      2
 100%  19668 (longest request)
 u1@~/Projects$

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21035>
_______________________________________


More information about the Python-bugs-list mailing list