On Oct 7, 5:55 pm, Omry Yadan <[EMAIL PROTECTED]> wrote:
> Graham Dumpleton wrote:
> >>>> I have a problem apache workers running out due to trac misbehavior.
> >>>> if anything, I will reduce this number to something that will not take
> >>>> down the entire apache server whenever trac is acting up.
>
> >>> What database adapter are you using? If using an older version of it
> >>> than newest available, make sure you update it. Old versions of
> >>> psycopg2 have problems.
>
> >> I am using sqlite 3.3.8 with python-pysqlite2 2.3.2
>
> > Which is not the latest version of either package, which means any
> > problem could well have been fixed long ago.
>
> changed WSGIDaemonProcess line to:
> WSGIDaemonProcess firestats.cc user=omry group=omry threads=25
> maximum-requests=100 inactivity-timeout=120
>
> but it froze again (this time it took longer to happen, not sure if it's
> related).
> didn't had the chance to upgrade sqlite yet.
>
> my server froze again, 155 apache processes.
>
> this is the stack trace on one :
>
> (gdb) thread apply all bt
>
> Thread 1 (Thread 140422165649104 (LWP 28894)):
> #0 0x00007fb6942a7182 in __read_nocancel () from /lib/libpthread.so.0
> #1 0x00007fb69470258e in apr_file_read () from /usr/lib/libapr-1.so.0
> #2 0x00007fb695017664 in apr_bucket_pipe_create () from
> /usr/lib/libaprutil-1.so.0
> #3 0x0000000000437e52 in ap_open_logs ()
> #4 0x00000000004381ce in ap_scan_script_header_err_core ()
> #5 0x00007fb690211071 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so
> #6 0x00007fb69020cd9e in ?? () from /usr/lib/apache2/modules/mod_wsgi.so
> #7 0x0000000000432d09 in ap_run_handler ()
> #8 0x0000000000435e82 in ap_invoke_handler ()
> #9 0x0000000000442018 in ap_process_request ()
> #10 0x000000000043f4dc in ap_register_input_filter ()
> #11 0x0000000000439861 in ap_run_process_connection ()
> #12 0x00000000004459b1 in ap_graceful_stop_signalled ()
> #13 0x0000000000445c24 in ap_graceful_stop_signalled ()
> #14 0x00000000004464c6 in ap_mpm_run ()
> #15 0x0000000000420e70 in main ()
> #0 0x00007fb6942a7182 in __read_nocancel () from /lib/libpthread.so.0
>
> Here is the stacktrace of another:
>
> #0 0x00007fb6942a7472 in __connect_nocancel () from /lib/libpthread.so.0
> #1 0x00007fb690210591 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so
> #2 0x00007fb690210e2d in ?? () from /usr/lib/apache2/modules/mod_wsgi.so
> #3 0x00007fb69020cd9e in ?? () from /usr/lib/apache2/modules/mod_wsgi.so
> #4 0x0000000000432d09 in ap_run_handler ()
> #5 0x0000000000435e82 in ap_invoke_handler ()
> #6 0x0000000000442018 in ap_process_request ()
> #7 0x000000000043f4dc in ap_register_input_filter ()
> #8 0x0000000000439861 in ap_run_process_connection ()
> #9 0x00000000004459b1 in ap_graceful_stop_signalled ()
> #10 0x0000000000445c24 in ap_graceful_stop_signalled ()
> #11 0x00000000004464c6 in ap_mpm_run ()
> #12 0x0000000000420e70 in main ()
>
> anything useful here?
No, for a couple of reasons.
The first is that debug information not available in mod_wsgi as not
compiled with debugging. Thus ensure that -g option is included when
compiling mod_wsgi.
Second is that actually want the tracebacks for mod_wsgi daemon
process and not Apache worker processes. Use option:
display-name=%{GROUP}
with WSGIDaemonProcess. Use 'ps' command to identify the mod_wsgi
daemon process and attach gdb to it, then get tracebacks.
Reason for getting tracebacks for daemon processes is to ascertain if
threads there are stuck or not. If not, then it is an Apache
configuration issue which is most likely nothing to do with mod_wsgi.
BTW, when using mod_wsgi daemon mode, if not running PHP in Apache,
then you are better off running Apacher worker MPM rather than
prefork. That way number of processes less and overall Apache will use
less memory.
Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" 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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---