Does the configuration work for a hello world WSGI application? That
is, before you try and use your actual application.

Also see comments below.

2009/7/3 Aslan <[email protected]>:
>
> Hi.
>
> Firstly, I show my configuration in httpd.conf as following...
>
> ==========================================================
> LoadModule wsgi_module /i-data/f0092d81/public/mod_wsgi.so
>
> WSGIPythonHome /usr/Pylons
> <Directory /usr/Pylons>
> Order allow,deny
> Allow from all
> </Directory>

Why are you overriding WSGIPythonHome? There are only certain
circumstances you would want to do that, and if there isn't a proper
Python installation in that location which matches the version which
mod_wsgi was compiled for, it could (especially if wrong version)
cause a crash to occur.

So, do you really have a Python 2.6 installed in that location?

> <Directory /i-data/f0092d81/public/aslan>
> WSGIApplicationGroup %{GLOBAL}
> WSGIProcessGroup aslan
> Order allow,deny
> Allow from all
> </Directory>
>
> WSGIRestrictStdout Off
> WSGIDaemonProcess aslan threads=5
> #WSGIImportScript /i-data/f0092d81/public/aslan/aslan.wsgi process-
> group=aslan a
> WSGIScriptAlias /aslan /i-data/f0092d81/public/aslan/aslan.wsgi
> ==========================================================
>
> And I will see many error logs from httpd when I starting httpd,
> like...
> ==========================================================
> [Fri Jul 03 13:36:57 2009] [debug] ssl_engine_init.c(747): Configuring
> RSA server private key
> [Fri Jul 03 13:36:57 2009] [info] mod_ssl/2.2.9 compiled against
> Server: Apache/2.2.9, Library: OpenSSL/0.9.7e
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12386): Initializing
> Python.
> [Fri Jul 03 13:36:57 2009] [debug] mod_wsgi.c(8077): mod_wsgi
> (pid=12386): Socket for 'aslan' is '/usr/local/apache2/logs/wsgi.
> 12386.0.1.sock'.
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12387): Starting
> process 'aslan' with uid=99, gid=99 and threads=5.
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12387): Attach
> interpreter ''.
> [Fri Jul 03 13:36:57 2009] [warn] pid file /var/run/httpd.pid
> overwritten -- Unclean shutdown of previous Apache run?
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12389): Attach
> interpreter ''.
> [Fri Jul 03 13:36:57 2009] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
> OpenSSL/0.9.7e mod_wsgi/2.4 Python/2.6.2 configured -- resuming normal
> operations
> [Fri Jul 03 13:36:57 2009] [info] Server built: Feb 24 2009 12:39:51
> [Fri Jul 03 13:36:57 2009] [debug] prefork.c(1001): AcceptMutex:
> sysvsem (default: sysvsem)
> [Fri Jul 03 13:36:57 2009] [notice] child pid 12387 exit signal
> Segmentation fault (11)
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12387): Process
> 'aslan' has died, restarting.
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12390): Starting
> process 'aslan' with uid=99, gid=99 and threads=5.
> [Fri Jul 03 13:36:57 2009] [info] mod_wsgi (pid=12390): Attach
> interpreter ''.
> [Fri Jul 03 13:36:57 2009] [notice] child pid 12390 exit signal
> Segmentation fault (11)
> ...
> ==========================================================
>
> Does anyone can  help me how to fix this? VERY VERY THANKS~

Crashes can occur for various reasons. the likely one in your case is
a mismatch in shared libraries used by Apache and by certain Python C
extension modules. These can include expat, SSL, mysql, ldap etc etc.

Is this problem only happening when a request is made against the
application? If so, follow procedure dictated in:

  
http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Debugging_Crashes_With_GDB

Either add:

  display-name=%{GROUP}

as option to WSGIDaemonProcess directive and us 'ps' to identify the
process ID of the (wsgi:aslan) process or work it out from messages in
Apache error log.

You will then need to follow the example in documentation of form:

  sudo gdb /usr/local/apache/bin/httpd 666

Replace '666' with the actual process ID and use appropriate path for
httpd executable. Once attached, let process continue and fire off
request. Then use:

  thread apply all bt

to work out where it crashed.

Post the stack trace and can then point out to you which library is
likely in conflict.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to