Hi, We have an issue with mod_wsgi where it hangs after serving some N requests. After it is hung, CPU usage shoots up to 900%. We are running apache 2.2.15 with mod_wsgi 3.4 in daemon mode.
I verified that mod_python is not loading with apache. The version of python running on that box is same as the version mod_wsgi is configured with. I followed the http://code.google.com/p/modwsgi/wiki/DebuggingTechniques and couldn't get to the bottom of the issue. Here is our conf , log and attempt to identify the issue. Version details [Tue Jan 15 23:11:39 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.4 Python/2.6.6 configured -- resuming normal operations # Apache config CoreDumpDirectory /export/apps/neodb/tmp LogLevel info WSGIVerboseDebugging On <VirtualHost *:19999> WSGIDaemonProcess neodb python-path=/export/apps/neodb/lib/python2.6/site-packages/ deadlock-timeout=20 display-name=neodb WSGIProcessGroup neodb WSGIApplicationGroup %{GLOBAL} </VirtualHost> # From the error log [Tue Jan 15 23:11:39 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.4 Python/2.6.6 configured -- resuming normal operations [Tue Jan 15 23:12:12 2013] [error] [client 172.19.17.82] Premature end of script headers: runserver.wsgi [Tue Jan 15 23:12:13 2013] [notice] child pid 31301 exit signal Segmentation fault (11) [Tue Jan 15 23:12:13 2013] [info] mod_wsgi (pid=31558): Attach interpreter ''. [Tue Jan 15 23:12:13 2013] [info] mod_wsgi (pid=31558): Adding '/export/apps/neodb/lib/python2.6/site-packages/' to path. [Tue Jan 15 23:12:13 2013] [info] [client 172.18.45.218] mod_wsgi (pid=31558, process='neodb', application=''): Loading WSGI script '/export/apps/neodb/www/runserver.wsgi'. # list of apache modules ls /etc/httpd/modules/ mod_actions.so mod_authn_dbm.so mod_authz_owner.so mod_dav.so mod_ext_filter.so mod_log_forensic.so mod_proxy_ftp.so mod_ssl.so mod_vhost_alias.so mod_alias.so mod_authn_default.so mod_authz_user.so mod_dbd.so mod_filter.so mod_logio.so mod_proxy_http.so mod_status.so mod_wsgi.so mod_asis.so mod_authn_file.so mod_autoindex.so mod_deflate.so mod_headers.so mod_mime_magic.so mod_proxy_scgi.so mod_substitute.so mod_auth_basic.so mod_authnz_ldap.so mod_cache.so mod_dir.so mod_ident.so mod_mime.so mod_proxy.so mod_suexec.so mod_auth_digest.so mod_authz_dbm.so mod_cern_meta.so mod_disk_cache.so mod_include.so mod_negotiation.so mod_reqtimeout.so mod_unique_id.so mod_authn_alias.so mod_authz_default.so mod_cgid.so mod_dumpio.so mod_info.so mod_proxy_ajp.so mod_rewrite.so mod_userdir.so mod_authn_anon.so mod_authz_groupfile.so mod_cgi.so mod_env.so mod_ldap.so mod_proxy_balancer.so mod_setenvif.so mod_usertrack.so mod_authn_dbd.so mod_authz_host.so mod_dav_fs.so mod_expires.so mod_log_config.so mod_proxy_connect.so mod_speling.so mod_version.so # Apache details $ sudo /usr/sbin/httpd -V [sudo] password for senkumar: Server version: Apache/2.2.15 (Unix) Server built: Apr 9 2011 08:58:28 Server's Module Magic Number: 20051115:24 Server loaded: APR 1.3.9, APR-Util 1.3.9 Compiled using: APR 1.3.9, APR-Util 1.3.9 Architecture: 64-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/etc/httpd" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" #Apache compiled modules sudo /usr/sbin/httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c $ sudo /usr/sbin/httpd -M [Wed Jan 16 04:16:14 2013] [warn] NameVirtualHost *:80 has no VirtualHosts [Wed Jan 16 04:16:14 2013] [warn] NameVirtualHost *:80 has no VirtualHosts [Wed Jan 16 04:16:14 2013] [warn] NameVirtualHost *:443 has no VirtualHosts Loaded Modules: core_module (static) mpm_prefork_module (static) http_module (static) so_module (static) auth_basic_module (shared) auth_digest_module (shared) authn_file_module (shared) authn_alias_module (shared) authn_anon_module (shared) authn_dbm_module (shared) authn_default_module (shared) authz_host_module (shared) authz_user_module (shared) authz_owner_module (shared) authz_groupfile_module (shared) authz_dbm_module (shared) authz_default_module (shared) ldap_module (shared) authnz_ldap_module (shared) include_module (shared) log_config_module (shared) logio_module (shared) env_module (shared) ext_filter_module (shared) mime_magic_module (shared) expires_module (shared) deflate_module (shared) headers_module (shared) usertrack_module (shared) setenvif_module (shared) mime_module (shared) dav_module (shared) status_module (shared) autoindex_module (shared) info_module (shared) dav_fs_module (shared) vhost_alias_module (shared) negotiation_module (shared) dir_module (shared) actions_module (shared) speling_module (shared) userdir_module (shared) alias_module (shared) substitute_module (shared) rewrite_module (shared) proxy_module (shared) proxy_balancer_module (shared) proxy_ftp_module (shared) proxy_http_module (shared) proxy_ajp_module (shared) proxy_connect_module (shared) cache_module (shared) suexec_module (shared) disk_cache_module (shared) cgi_module (shared) version_module (shared) ssl_module (shared) wsgi_module (shared) Syntax OK Strace attempt $ sudo strace -p 31558 Process 31558 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...> GDB attempt (gdb) bt #0 0x00007fa1dc6941e3 in poll () from /lib64/libc.so.6 #1 0x00007fa1dcb83ba8 in apr_poll () from /usr/lib64/libapr-1.so.0 #2 0x00007fa1d23e6247 in ?? () from /etc/httpd/modules/mod_wsgi.so #3 0x00007fa1d23e6c8f in ?? () from /etc/httpd/modules/mod_wsgi.so #4 0x00007fa1d23e8571 in ?? () from /etc/httpd/modules/mod_wsgi.so #5 0x00007fa1dcb7f751 in apr_proc_other_child_alert () from /usr/lib64/libapr-1.so.0 #6 0x00007fa1de0b8d23 in ap_mpm_run () #7 0x00007fa1de090840 in main () Please let me know if you see any issue here. Thanks, Senthil -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/6ZSAmrp9WhwJ. 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.
