On 10 April 2010 22:50, Graham Dumpleton <[email protected]> wrote: > On 10 April 2010 22:26, Graham Dumpleton <[email protected]> wrote: >> [Thu Apr 01 02:36:39 2010] [error] [client 127.0.0.1] (111)Connection >> refused: mod_wsgi (pid=24782): Unab >> le to connect to WSGI daemon process 'seenreport' on >> '/var/run/apache2/wsgi.24773.0.1.sock' after multipl >> e attempts. >> >> This is showing something is wrong for a start. What happens is that code >> has: >> >> apr_interval_time_t timer = apr_time_from_sec(0.1); >> >> Then in a loop for each time it fails it does: >> >> apr_sleep(timer); >> if (timer < apr_time_from_sec(2)) >> timer *= 2; >> >> So, it should back off progressively and sleep longer and longer >> between attempts, with at most about 2 seconds at maximum. It should >> bail out after 15 attempts specifically for connection refused >> messages. >> >> If you look at the log messages though, all the messages are within >> the same second, so must be something wrong with code, but I can't see >> what it is on first inspection. > > Can you change the line: > > apr_interval_time_t timer = apr_time_from_sec(0.1); > > to: > > apr_interval_time_t timer = apr_time_make(0, 10000);
Hmmm, 0.1 seconds means that should actually be: apr_interval_time_t timer = apr_time_make(0, 100000); Graham > > That will fix the problems in backoff not working. > > The apr_time_from_sec() macro forcibly casts the argument to an > integral type first before calculating number of microseconds and > therefore argument can not be part seconds. > > I don't believe this will fix the overall issues however as still > seems to relate more to the deadlocks. > > Graham > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
