sankarNarayanan / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Delays on attempts to reconnect to daemon process no working. #195

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When there is a failure for Apache server child process to connect to mod_wsgi 
daemon process, 
there are supposed to be delays until try again, with the delay doubling each 
time form starting 
value of 0.1, with a ceiling of 2.0 seconds on the delay. This hasn't been 
working as shown from 
following logs.

[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #1 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #2 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #3 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #4 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #5 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #6 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #7 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #8 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #9 to WSGI daemon process 'seenreport' on 
'/var/run/a
pache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #10 to WSGI daemon process 'seenreport' on 
'/var/run/
apache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #11 to WSGI daemon process 'seenreport' on 
'/var/run/
apache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #12 to WSGI daemon process 'seenreport' on 
'/var/run/
apache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #13 to WSGI daemon process 'seenreport' on 
'/var/run/
apache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Connection attempt #14 to WSGI daemon process 'seenreport' on 
'/var/run/
apache2/wsgi.24773.0.1.sock' failed, sleeping before retrying again.
[Thu Apr 01 02:48:55 2010] [error] [client 127.0.0.1] (111)Connection refused: 
mod_wsgi 
(pid=24779): Unable to connect to WSGI daemon process 'seenreport' on 
'/var/run/apach
e2/wsgi.24773.0.1.sock' after multiple attempts.

All the attempts complete within 1 second instead of taking almost 30 seconds.

Problem is that code was trying to use apr_time_from_sec() macro for partial 
seconds, which can't 
be done as argument is rounded down to integer value. Should have been using 
apr_time_make() 
instead.

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 11 Apr 2010 at 3:54

GoogleCodeExporter commented 8 years ago
Fixed in revision 1581 of trunk for 4.0.

Original comment by Graham.Dumpleton@gmail.com on 11 Apr 2010 at 3:56

GoogleCodeExporter commented 8 years ago
Backport to mod_wsgi 3.X branch for 3.3 in revision 1601.

Original comment by Graham.Dumpleton@gmail.com on 12 Jul 2010 at 2:04

GoogleCodeExporter commented 8 years ago
Version 3.3 has been released.

Original comment by Graham.Dumpleton@gmail.com on 31 Jul 2010 at 10:39