[modwsgi] Re: Django virtualenv mod_wsgi, can't import django.*
What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Thank you kindly, that took me another step forward. Now I got the following error in log: [Thu Apr 16 09:29:09 2009] [error] [client 41.240.91.23] (13) Permission denied: mod_wsgi (pid=19767): Unable to connect to WSGI daemon process 'InTrack' on '/etc/httpd/logs/wsgi.19713.0.1.sock' after multiple attempts. I take it, in this case, that my user 'intrack' doesn't have permission to connect to the socket /etc/httpd/logs/wsgi. 19713.0.1.sock. Is this right and do you have any suggestions how to rectify this please? I can confirm that the socket file /etc/httpd/logs/wsgi.19713.0.1.sock does exist hence has been created. -Alen On Apr 15, 11:17 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: Thank you Graham for your reply. You are definitely right about the permissions. Apache User and Group directives are both set to 'apache'. My wsgi (django) application is in the /home/intrack which is the 'intrack' user. I added the WSGIDaemonProcess directive: # WSGIDaemonProcess user=intrack group=intrack python-path=/home/intrack/ intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 # WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi This is wrong. See: http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide http://code.google.com/p/modwsgi/wiki/VirtualEnvironments for complete examples. The mistakes are that you have called the daemon process group 'user=intrack' as first argument is supposed to be the name. You also don't appear to have WSGIProcessGroup directive to delegate application to that process group. What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Graham That still gave me a same error ImportError: No module named django.core.handlers.wsgi Question: who is the .wsgi script ran by? Apache special user? or the one defined on WSGIDaemonProcess (in my case 'intrack' user)? Also, am I on the right track here using WSGIDaemonProcess to set the user I wish to run the application as? (I have fully tested the django application using the 'intrack' user. By the way, /home/intrack has the django app and the python virtual environment.) I started the httpd service as root by the way. Is perhaps the WSGIDaemonProcess not using the intrack user to run the python process? -Alen On Apr 15, 12:35 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 Alen Ribic alen.ri...@gmail.com: I've seen a few posts related to Django, virtualenv and mod_wsgi however still can't solve my problem. I keep getting ImportError: No module named django.core.handlers.wsgi in my apache error log no matter what I try. Read: http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights... Apache runs as a special user . If you are using embedded mode, or daemon mode but haven't set 'user' option to be your account, then may not be able to read directories/files if permissions on them aren't correct. Try your command line test, but become the user that Apache runs as first. If that fails you know this is the problem. In your command line test from your account, also do: import django print django.__file__ Ensure that that is the version you want used. Then check that all the files readable to others and that directories readable and searchable to others. For directories, this includes directories back up the hierarchy to root of file system. Graham Here is the wsgi script: intrack.wsgi import os, sys, site import logging #create logger logger = logging.getLogger(intrack_wsgi) logger.setLevel(logging.DEBUG) fh = logging.FileHandler(/tmp/InTrackWSGI.log) fh.setLevel(logging.DEBUG) formatter = logging.Formatter(%(asctime)s - %(name)s - %(levelname)s - %(message)s) fh.setFormatter(formatter) logger.addHandler(fh) sys.path.append('/home/intrack/intrack_pythonenv/projects') sys.path.append('/home/intrack/intrack_pythonenv/projects/InTrack') os.environ['DJANGO_SETTINGS_MODULE'] = 'InTrack.settings' ALLDIRS = ['/home/intrack/intrack_pythonenv/lib/python2.5/site- packages'] # Remember original sys.path. prev_sys_path = list(sys.path) # Add each new site-packages directory. for directory in ALLDIRS: site.addsitedir(directory) # Reorder sys.path so new directories at the front. new_sys_path = [] for
[modwsgi] Re: Django virtualenv mod_wsgi, can't import django.*
2009/4/16 Alen Ribic alen.ri...@gmail.com: What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Thank you kindly, that took me another step forward. Now I got the following error in log: [Thu Apr 16 09:29:09 2009] [error] [client 41.240.91.23] (13) Permission denied: mod_wsgi (pid=19767): Unable to connect to WSGI daemon process 'InTrack' on '/etc/httpd/logs/wsgi.19713.0.1.sock' after multiple attempts. I take it, in this case, that my user 'intrack' doesn't have permission to connect to the socket /etc/httpd/logs/wsgi. 19713.0.1.sock. Is this right and do you have any suggestions how to rectify this please? I can confirm that the socket file /etc/httpd/logs/wsgi.19713.0.1.sock does exist hence has been created. Read: http://code.google.com/p/modwsgi/wiki/ConfigurationIssues#Location_Of_UNIX_Sockets Then try setting: WSGISocketPrefix run/wsgi in Apache configuration as directed. Graham -Alen On Apr 15, 11:17 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: Thank you Graham for your reply. You are definitely right about the permissions. Apache User and Group directives are both set to 'apache'. My wsgi (django) application is in the /home/intrack which is the 'intrack' user. I added the WSGIDaemonProcess directive: # WSGIDaemonProcess user=intrack group=intrack python-path=/home/intrack/ intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 # WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi This is wrong. See: http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide http://code.google.com/p/modwsgi/wiki/VirtualEnvironments for complete examples. The mistakes are that you have called the daemon process group 'user=intrack' as first argument is supposed to be the name. You also don't appear to have WSGIProcessGroup directive to delegate application to that process group. What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Graham That still gave me a same error ImportError: No module named django.core.handlers.wsgi Question: who is the .wsgi script ran by? Apache special user? or the one defined on WSGIDaemonProcess (in my case 'intrack' user)? Also, am I on the right track here using WSGIDaemonProcess to set the user I wish to run the application as? (I have fully tested the django application using the 'intrack' user. By the way, /home/intrack has the django app and the python virtual environment.) I started the httpd service as root by the way. Is perhaps the WSGIDaemonProcess not using the intrack user to run the python process? -Alen On Apr 15, 12:35 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 Alen Ribic alen.ri...@gmail.com: I've seen a few posts related to Django, virtualenv and mod_wsgi however still can't solve my problem. I keep getting ImportError: No module named django.core.handlers.wsgi in my apache error log no matter what I try. Read: http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights... Apache runs as a special user . If you are using embedded mode, or daemon mode but haven't set 'user' option to be your account, then may not be able to read directories/files if permissions on them aren't correct. Try your command line test, but become the user that Apache runs as first. If that fails you know this is the problem. In your command line test from your account, also do: import django print django.__file__ Ensure that that is the version you want used. Then check that all the files readable to others and that directories readable and searchable to others. For directories, this includes directories back up the hierarchy to root of file system. Graham Here is the wsgi script: intrack.wsgi import os, sys, site import logging #create logger logger = logging.getLogger(intrack_wsgi) logger.setLevel(logging.DEBUG) fh = logging.FileHandler(/tmp/InTrackWSGI.log) fh.setLevel(logging.DEBUG) formatter = logging.Formatter(%(asctime)s - %(name)s - %(levelname)s - %(message)s) fh.setFormatter(formatter) logger.addHandler(fh) sys.path.append('/home/intrack/intrack_pythonenv/projects') sys.path.append('/home/intrack/intrack_pythonenv/projects/InTrack') os.environ['DJANGO_SETTINGS_MODULE'] = 'InTrack.settings' ALLDIRS = ['/home/intrack/intrack_pythonenv/lib/python2.5/site- packages'] #
[modwsgi] Re: Django virtualenv mod_wsgi, can't import django.*
2009/4/16 Alen Ribic alen.ri...@gmail.com: Ok that fixed the socket connection permission issue. I confirm that all is working now. The WSGISocketPrefix directive worked. I just set mine to: WSGISocketPrefix /tmp/wsgi Preferably do not put it in /tmp, especially if this is a shared system. Part of the security of mod_wsgi relies on it being in a directory not writable to mortal users. So, try the 'run/wsgi' value first, with no leading slash. The 'run' directory is used on RedHat based distributions. If that doesn't work, see if the system has a '/var/run/httpd' or '/var/run/apache' directory and if so, set it to that full path with '/wsgi' on end. Normally there should be a 'run' symlink to that under Apache server root though, so saying 'run/wsgi' should be sufficient on those systems where 'log' directory, which would normally be used, is not readable to mortal users. Graham No mo permission issues as /tmp on my server is readable and writeable by all users. Thank you very much for all your help. -Alen On Apr 16, 10:02 am, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Thank you kindly, that took me another step forward. Now I got the following error in log: [Thu Apr 16 09:29:09 2009] [error] [client 41.240.91.23] (13) Permission denied: mod_wsgi (pid=19767): Unable to connect to WSGI daemon process 'InTrack' on '/etc/httpd/logs/wsgi.19713.0.1.sock' after multiple attempts. I take it, in this case, that my user 'intrack' doesn't have permission to connect to the socket /etc/httpd/logs/wsgi. 19713.0.1.sock. Is this right and do you have any suggestions how to rectify this please? I can confirm that the socket file /etc/httpd/logs/wsgi.19713.0.1.sock does exist hence has been created. Read: http://code.google.com/p/modwsgi/wiki/ConfigurationIssues#Location_Of... Then try setting: WSGISocketPrefix run/wsgi in Apache configuration as directed. Graham -Alen On Apr 15, 11:17 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: Thank you Graham for your reply. You are definitely right about the permissions. Apache User and Group directives are both set to 'apache'. My wsgi (django) application is in the /home/intrack which is the 'intrack' user. I added the WSGIDaemonProcess directive: # WSGIDaemonProcess user=intrack group=intrack python-path=/home/intrack/ intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 # WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi This is wrong. See: http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide http://code.google.com/p/modwsgi/wiki/VirtualEnvironments for complete examples. The mistakes are that you have called the daemon process group 'user=intrack' as first argument is supposed to be the name. You also don't appear to have WSGIProcessGroup directive to delegate application to that process group. What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Graham That still gave me a same error ImportError: No module named django.core.handlers.wsgi Question: who is the .wsgi script ran by? Apache special user? or the one defined on WSGIDaemonProcess (in my case 'intrack' user)? Also, am I on the right track here using WSGIDaemonProcess to set the user I wish to run the application as? (I have fully tested the django application using the 'intrack' user. By the way, /home/intrack has the django app and the python virtual environment.) I started the httpd service as root by the way. Is perhaps the WSGIDaemonProcess not using the intrack user to run the python process? -Alen On Apr 15, 12:35 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 Alen Ribic alen.ri...@gmail.com: I've seen a few posts related to Django, virtualenv and mod_wsgi however still can't solve my problem. I keep getting ImportError: No module named django.core.handlers.wsgi in my apache error log no matter what I try. Read: http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights... Apache runs as a special user . If you are using embedded mode, or daemon mode but haven't set 'user' option to be your account, then may not be able to read directories/files if permissions on them aren't correct. Try your command line test, but become the user
[modwsgi] Re: Django virtualenv mod_wsgi, can't import django.*
So, try the 'run/wsgi' value first, with no leading slash. I am running on a RedHat flavored distro, so: WSGISocketPrefix run/wsgi worked 100%. Thank you again. -Alen On Apr 16, 10:25 am, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: Ok that fixed the socket connection permission issue. I confirm that all is working now. The WSGISocketPrefix directive worked. I just set mine to: WSGISocketPrefix /tmp/wsgi Preferably do not put it in /tmp, especially if this is a shared system. Part of the security of mod_wsgi relies on it being in a directory not writable to mortal users. So, try the 'run/wsgi' value first, with no leading slash. The 'run' directory is used on RedHat based distributions. If that doesn't work, see if the system has a '/var/run/httpd' or '/var/run/apache' directory and if so, set it to that full path with '/wsgi' on end. Normally there should be a 'run' symlink to that under Apache server root though, so saying 'run/wsgi' should be sufficient on those systems where 'log' directory, which would normally be used, is not readable to mortal users. Graham No mo permission issues as /tmp on my server is readable and writeable by all users. Thank you very much for all your help. -Alen On Apr 16, 10:02 am, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Thank you kindly, that took me another step forward. Now I got the following error in log: [Thu Apr 16 09:29:09 2009] [error] [client 41.240.91.23] (13) Permission denied: mod_wsgi (pid=19767): Unable to connect to WSGI daemon process 'InTrack' on '/etc/httpd/logs/wsgi.19713.0.1.sock' after multiple attempts. I take it, in this case, that my user 'intrack' doesn't have permission to connect to the socket /etc/httpd/logs/wsgi. 19713.0.1.sock. Is this right and do you have any suggestions how to rectify this please? I can confirm that the socket file /etc/httpd/logs/wsgi.19713.0.1.sock does exist hence has been created. Read: http://code.google.com/p/modwsgi/wiki/ConfigurationIssues#Location_Of... Then try setting: WSGISocketPrefix run/wsgi in Apache configuration as directed. Graham -Alen On Apr 15, 11:17 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Alen Ribic alen.ri...@gmail.com: Thank you Graham for your reply. You are definitely right about the permissions. Apache User and Group directives are both set to 'apache'. My wsgi (django) application is in the /home/intrack which is the 'intrack' user. I added the WSGIDaemonProcess directive: # WSGIDaemonProcess user=intrack group=intrack python-path=/home/intrack/ intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 # WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi This is wrong. See: http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide http://code.google.com/p/modwsgi/wiki/VirtualEnvironments for complete examples. The mistakes are that you have called the daemon process group 'user=intrack' as first argument is supposed to be the name. You also don't appear to have WSGIProcessGroup directive to delegate application to that process group. What you probably want is: WSGIDaemonProcess mysite user=intrack group=intrack python-path=/home/intrack/intrack_pythonenv/lib/python2.5/site-packages processes=2 threads=25 WSGIProcessGroup mysite WSGIScriptAlias / /var/www/wsgi_scripts/InTrack.wsgi Graham That still gave me a same error ImportError: No module named django.core.handlers.wsgi Question: who is the .wsgi script ran by? Apache special user? or the one defined on WSGIDaemonProcess (in my case 'intrack' user)? Also, am I on the right track here using WSGIDaemonProcess to set the user I wish to run the application as? (I have fully tested the django application using the 'intrack' user. By the way, /home/intrack has the django app and the python virtual environment.) I started the httpd service as root by the way. Is perhaps the WSGIDaemonProcess not using the intrack user to run the python process? -Alen On Apr 15, 12:35 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 Alen Ribic alen.ri...@gmail.com: I've seen a few posts related to Django, virtualenv and mod_wsgi however still can't solve my problem. I keep getting ImportError: No module named django.core.handlers.wsgi in my apache error log no matter what I try. Read:
[modwsgi] Re: win32 modwsgi error: ImportError: DLL load failed
Another issue: After I add WSGIDaemonProcess moin user=someuser group=somegroup home=/home/someuser processes=5 threads=10 maximum-requests=1000 umask=0007 to my http.conf,I could not start the apache service,got the err message:The Apache service named reported the following error: Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration . and the WSGIScriptAlias is ok. Thanks! On Thu, Apr 16, 2009 at 11:31 AM, Chunlin Zhang zhangchun...@gmail.com wrote: It is OK now! I reinstall with python 2.6.2 and now works. Thank you very much! On Thu, Apr 16, 2009 at 9:33 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Chunlin Zhang zhangchun...@gmail.com: On Thu, Apr 16, 2009 at 4:56 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 chunlin zhangchun...@gmail.com: I just check my python installation,found the directory is C: \Documents and Settings\All Users\...\Python 2.6,so I chose All Users. That isn't necessarily sufficient indication as there are registry entries as well and is is those which are more of an issue as they define the directories to look for stuff. If you are going to reinstall anythng, install newer Python 2.6.2. Don't go back to Python 2.5 as don't supply latest mod_wsgi.so for that version of Python. So, just try the reinstall of Python like suggested. But like you say before,the win32 build(mod_wsgi-win32-ap22py26-2.4.so) is for 2.6.1,no problem about that?(Or I misunderstood?) Ok,I will try it first(2.6.2),if back to 2.5 I will install too much python module... The patch revision (third number) of Python shouldn't matter, so that module, although compiled against Python 2.6.1 should also work for other Python 2.6.X versions. I just want to see Python reinstalled and since 2.6.2 is latest, no reason not to use that. Graham Graham And I always using a Administrator privilege account(a windows user's usual habbit...). So I had better turn back to python 2.5...:( On Apr 15, 7:21 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Hmmm, I tell a lie. SInce Python 2.6.2 only just got released, the Apache module must have been compiled against Python 2.6.1. Can't be bothered starting up Windows at the moment to check. Anyway, would suggest your problem is therefore likely to be due to Python not being installed so as to be available to all users. So, reinstall it as user with Administrator rights and install it for all users when prompted. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: win32 modwsgi error: ImportError: DLL load failed
2009/4/16 Chunlin Zhang zhangchun...@gmail.com: Another issue: After I add WSGIDaemonProcess moin user=someuser group=somegroup home=/home/someuser processes=5 threads=10 maximum-requests=1000 umask=0007 to my http.conf,I could not start the apache service,got the err message:The Apache service named reported the following error: Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration . and the WSGIScriptAlias is ok. Daemon mode is not available on Windows. Just drop the WSGIDaemonProcess and WSGIProcessGroup directives. Graham Thanks! On Thu, Apr 16, 2009 at 11:31 AM, Chunlin Zhang zhangchun...@gmail.com wrote: It is OK now! I reinstall with python 2.6.2 and now works. Thank you very much! On Thu, Apr 16, 2009 at 9:33 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Chunlin Zhang zhangchun...@gmail.com: On Thu, Apr 16, 2009 at 4:56 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 chunlin zhangchun...@gmail.com: I just check my python installation,found the directory is C: \Documents and Settings\All Users\...\Python 2.6,so I chose All Users. That isn't necessarily sufficient indication as there are registry entries as well and is is those which are more of an issue as they define the directories to look for stuff. If you are going to reinstall anythng, install newer Python 2.6.2. Don't go back to Python 2.5 as don't supply latest mod_wsgi.so for that version of Python. So, just try the reinstall of Python like suggested. But like you say before,the win32 build(mod_wsgi-win32-ap22py26-2.4.so) is for 2.6.1,no problem about that?(Or I misunderstood?) Ok,I will try it first(2.6.2),if back to 2.5 I will install too much python module... The patch revision (third number) of Python shouldn't matter, so that module, although compiled against Python 2.6.1 should also work for other Python 2.6.X versions. I just want to see Python reinstalled and since 2.6.2 is latest, no reason not to use that. Graham Graham And I always using a Administrator privilege account(a windows user's usual habbit...). So I had better turn back to python 2.5...:( On Apr 15, 7:21 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Hmmm, I tell a lie. SInce Python 2.6.2 only just got released, the Apache module must have been compiled against Python 2.6.1. Can't be bothered starting up Windows at the moment to check. Anyway, would suggest your problem is therefore likely to be due to Python not being installed so as to be available to all users. So, reinstall it as user with Administrator rights and install it for all users when prompted. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Is this correct way for using mod_wsgi
I have installed Apache/2.0.59 with MPM prefork with mod_wsgi and it works. But I wanted to installed MPM worker so I compiled and installed Apache/2.0.63 with MPM worker to a different directory but have not installed again mod_wsgi .Instead I copied the installed mod_wsgi to the modules directory that Apache/2.0.63 with MPM worker uses. Is it possible? I am asking that because I receive Segmentation fault Thu Apr 16 12:36:24 2009] [notice] Apache/2.0.63 (Unix) mod_wsgi/2.3 Python/2.3.5 configured -- resuming normal operations [Thu Apr 16 12:36:34 2009] [notice] child pid 17305 exit signal Segmentation fault (11) [Thu Apr 16 12:36:38 2009] [notice] child pid 17306 exit signal Segmentation fault (11) How can I repair that? Thank you. L --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Is this correct way for using mod_wsgi
2009/4/16 Johny pyt...@hope.cz: I have installed Apache/2.0.59 with MPM prefork with mod_wsgi and it works. But I wanted to installed MPM worker so I compiled and installed Apache/2.0.63 with MPM worker to a different directory but have not installed again mod_wsgi .Instead I copied the installed mod_wsgi to the modules directory that Apache/2.0.63 with MPM worker uses. Is it possible? I am asking that because I receive Segmentation fault Thu Apr 16 12:36:24 2009] [notice] Apache/2.0.63 (Unix) mod_wsgi/2.3 Python/2.3.5 configured -- resuming normal operations [Thu Apr 16 12:36:34 2009] [notice] child pid 17305 exit signal Segmentation fault (11) [Thu Apr 16 12:36:38 2009] [notice] child pid 17306 exit signal Segmentation fault (11) How can I repair that? Normally the compiled mod_wsgi module should work with either prefork or worker MPM, but technically there are some things that could stop that. I can therefore only recommend you rebuild mod_wsgi from source against the newer Apache for the correct MPM. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Symbol not found: _PyExc_KeyError
Can you also post what the values of LDFLAGS and LDLIBS in the generated Makefile in mod_wsgi source directory are after having run configure. Graham 2009/4/16 Graham Dumpleton graham.dumple...@gmail.com: What do you get when you run: otool -L mod_wsgi.so Graham 2009/4/16 frank h. frank.hoffsum...@gmail.com: Hi I am trying to install mod_wsgi 2.4 on my PPC Mac OS X 10.4 Server machine. There is an apache2 living under /opt, furnished by Apple since Apache is $ file /opt/apache2/bin/httpd /opt/apache2/bin/httpd: Mach-O executable ppc I compiled my own Python 2.6.2 like this: curl -O http://python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2 bzip2 -d Python-2.6.2.tar.bz2 tar xf Python-2.6.2.tar cd Python-2.6.2 unset DYLD_LIBRARY_PATH unset LD_LIBRARY_PATH CFLAGS='-arch ppc' MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework=/Library/Frameworks make sudo make install $ file /Library/Frameworks/Python.framework/Versions/2.6/Python /Library/Frameworks/Python.framework/Versions/2.6/Python: Mach-O dynamically linked shared library ppc then I compiled mod_wsgi as follows export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --with-apxs=/opt/apache2/bin/apxs --with-python=/Library/ Frameworks/Python.framework/Versions/2.6/bin/python make sudo make install $ file /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: Mach-O bundle ppc then I change /opt/apache2/conf/http.conf to contain the line LoadModule wsgi_module modules/mod_wsgi.so trying to start apache, I get the following error $ sudo /opt/apache2/bin/apachectl start Syntax error on line 271 of /opt/apache2/conf/httpd.conf: Cannot load /opt/apache2/modules/mod_wsgi.so into server: Symbol not found: _PyExc_KeyError\n Referenced from: /opt/apache2/modules/ mod_wsgi.so\n Expected in: dynamic lookup\n not sure what is wrong there, any insight is much appreciated! thanks, -frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Is this correct way for using mod_wsgi
Graham, Thank you for your reply. So I tried to rebuild the mod_wsgi but it finds the old Apache ( prefork version) 2.0.59 root@ /mod_wsgi-2.4# ./configure checking for apxs2... no checking for apxs... /usr/sbin/apxs checking Apache version... 2.0.59 checking for python... /usr/bin/python configure: creating ./config.status config.status: creating Makefile How can I solve that? Thank you L. I have installed Apache/2.0.59 with MPM prefork with mod_wsgi and it works. But I wanted to installed MPM worker so I compiled and installed Apache/2.0.63 with MPM worker to a different directory but have not installed again mod_wsgi .Instead I copied the installed mod_wsgi to the modules directory that Apache/2.0.63 with MPM worker uses. Is it possible? I am asking that because I receive Segmentation fault Thu Apr 16 12:36:24 2009] [notice] Apache/2.0.63 (Unix) mod_wsgi/2.3 Python/2.3.5 configured -- resuming normal operations [Thu Apr 16 12:36:34 2009] [notice] child pid 17305 exit signal Segmentation fault (11) [Thu Apr 16 12:36:38 2009] [notice] child pid 17306 exit signal Segmentation fault (11) How can I repair that? Normally the compiled mod_wsgi module should work with either prefork or worker MPM, but technically there are some things that could stop that. I can therefore only recommend you rebuild mod_wsgi from source against the newer Apache for the correct MPM. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: win32 modwsgi error: ImportError: DLL load failed
On Thu, Apr 16, 2009 at 6:40 PM, Graham Dumpleton graham.dumple...@gmail.com wrote: Daemon mode is not available on Windows. Just drop the WSGIDaemonProcess and WSGIProcessGroup directives. Will it be supported in the future? Graham Thanks! On Thu, Apr 16, 2009 at 11:31 AM, Chunlin Zhang zhangchun...@gmail.com wrote: It is OK now! I reinstall with python 2.6.2 and now works. Thank you very much! On Thu, Apr 16, 2009 at 9:33 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Chunlin Zhang zhangchun...@gmail.com: On Thu, Apr 16, 2009 at 4:56 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 chunlin zhangchun...@gmail.com: I just check my python installation,found the directory is C: \Documents and Settings\All Users\...\Python 2.6,so I chose All Users. That isn't necessarily sufficient indication as there are registry entries as well and is is those which are more of an issue as they define the directories to look for stuff. If you are going to reinstall anythng, install newer Python 2.6.2. Don't go back to Python 2.5 as don't supply latest mod_wsgi.so for that version of Python. So, just try the reinstall of Python like suggested. But like you say before,the win32 build(mod_wsgi-win32-ap22py26-2.4.so) is for 2.6.1,no problem about that?(Or I misunderstood?) Ok,I will try it first(2.6.2),if back to 2.5 I will install too much python module... The patch revision (third number) of Python shouldn't matter, so that module, although compiled against Python 2.6.1 should also work for other Python 2.6.X versions. I just want to see Python reinstalled and since 2.6.2 is latest, no reason not to use that. Graham Graham And I always using a Administrator privilege account(a windows user's usual habbit...). So I had better turn back to python 2.5...:( On Apr 15, 7:21 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Hmmm, I tell a lie. SInce Python 2.6.2 only just got released, the Apache module must have been compiled against Python 2.6.1. Can't be bothered starting up Windows at the moment to check. Anyway, would suggest your problem is therefore likely to be due to Python not being installed so as to be available to all users. So, reinstall it as user with Administrator rights and install it for all users when prompted. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Symbol not found: _PyExc_KeyError
Graham, thanks for your help, here comes the output $ grep LD Makefile LDFLAGS = -F/Library/Frameworks -framework Python -u _PyMac_Error - arch ppc LDLIBS = -ldl $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS) $ otool -L /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) cheers -frank On Apr 16, 1:10 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Can you also post what the values of LDFLAGS and LDLIBS in the generated Makefile in mod_wsgi source directory are after having run configure. Graham 2009/4/16 Graham Dumpleton graham.dumple...@gmail.com: What do you get when you run: otool -L mod_wsgi.so Graham 2009/4/16 frank h. frank.hoffsum...@gmail.com: Hi I am trying to install mod_wsgi 2.4 on my PPC Mac OS X 10.4 Server machine. There is an apache2 living under /opt, furnished by Apple since Apache is $ file /opt/apache2/bin/httpd /opt/apache2/bin/httpd: Mach-O executable ppc I compiled my own Python 2.6.2 like this: curl -Ohttp://python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2 bzip2 -d Python-2.6.2.tar.bz2 tar xf Python-2.6.2.tar cd Python-2.6.2 unset DYLD_LIBRARY_PATH unset LD_LIBRARY_PATH CFLAGS='-arch ppc' MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework=/Library/Frameworks make sudo make install $ file /Library/Frameworks/Python.framework/Versions/2.6/Python /Library/Frameworks/Python.framework/Versions/2.6/Python: Mach-O dynamically linked shared library ppc then I compiled mod_wsgi as follows export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --with-apxs=/opt/apache2/bin/apxs --with-python=/Library/ Frameworks/Python.framework/Versions/2.6/bin/python make sudo make install $ file /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: Mach-O bundle ppc then I change /opt/apache2/conf/http.conf to contain the line LoadModule wsgi_module modules/mod_wsgi.so trying to start apache, I get the following error $ sudo /opt/apache2/bin/apachectl start Syntax error on line 271 of /opt/apache2/conf/httpd.conf: Cannot load /opt/apache2/modules/mod_wsgi.so into server: Symbol not found: _PyExc_KeyError\n Referenced from: /opt/apache2/modules/ mod_wsgi.so\n Expected in: dynamic lookup\n not sure what is wrong there, any insight is much appreciated! thanks, -frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: win32 modwsgi error: ImportError: DLL load failed
2009/4/16 Chunlin Zhang zhangchun...@gmail.com: On Thu, Apr 16, 2009 at 6:40 PM, Graham Dumpleton graham.dumple...@gmail.com wrote: Daemon mode is not available on Windows. Just drop the WSGIDaemonProcess and WSGIProcessGroup directives. Will it be supported in the future? No. Windows doesn't support fork() and how mod_wsgi daemon mode is implemented depends on having fork(). Graham Graham Thanks! On Thu, Apr 16, 2009 at 11:31 AM, Chunlin Zhang zhangchun...@gmail.com wrote: It is OK now! I reinstall with python 2.6.2 and now works. Thank you very much! On Thu, Apr 16, 2009 at 9:33 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/16 Chunlin Zhang zhangchun...@gmail.com: On Thu, Apr 16, 2009 at 4:56 AM, Graham Dumpleton graham.dumple...@gmail.com wrote: 2009/4/15 chunlin zhangchun...@gmail.com: I just check my python installation,found the directory is C: \Documents and Settings\All Users\...\Python 2.6,so I chose All Users. That isn't necessarily sufficient indication as there are registry entries as well and is is those which are more of an issue as they define the directories to look for stuff. If you are going to reinstall anythng, install newer Python 2.6.2. Don't go back to Python 2.5 as don't supply latest mod_wsgi.so for that version of Python. So, just try the reinstall of Python like suggested. But like you say before,the win32 build(mod_wsgi-win32-ap22py26-2.4.so) is for 2.6.1,no problem about that?(Or I misunderstood?) Ok,I will try it first(2.6.2),if back to 2.5 I will install too much python module... The patch revision (third number) of Python shouldn't matter, so that module, although compiled against Python 2.6.1 should also work for other Python 2.6.X versions. I just want to see Python reinstalled and since 2.6.2 is latest, no reason not to use that. Graham Graham And I always using a Administrator privilege account(a windows user's usual habbit...). So I had better turn back to python 2.5...:( On Apr 15, 7:21 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Hmmm, I tell a lie. SInce Python 2.6.2 only just got released, the Apache module must have been compiled against Python 2.6.1. Can't be bothered starting up Windows at the moment to check. Anyway, would suggest your problem is therefore likely to be due to Python not being installed so as to be available to all users. So, reinstall it as user with Administrator rights and install it for all users when prompted. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Intermittent NoReverseMatch errors
The urls that not working aren't using anything except the plain django 1.0.2. (No GeoDjango). So it could be django. How would increasing the max requests make it more thread-safe? On Apr 15, 4:03 pm, Ariel Mauricio Nunez Gomez ingenieroar...@gmail.com wrote: Bah, I didn't realize it was an old thread, the OP must have solved his issue by now. Alex, are you using any library that is not thread safe? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Symbol not found: _PyExc_KeyError
2009/4/16 frank h. frank.hoffsum...@gmail.com: Graham, thanks for your help, here comes the output $ grep LD Makefile LDFLAGS = -F/Library/Frameworks -framework Python -u _PyMac_Error - arch ppc LDLIBS = -ldl $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS) $ otool -L /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) Hmmm, lacking dependency on Python framework, which is why symbol obviously coming up undefined. What is in the directory: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config ie., run 'ls -las' in that directory. Can you also possibly not install the Python version into /Library. Instead use: ./configure --prefix=/usr/local/python-2.6 \ --enable-framework=/usr/local/python-2.6/frameworks \ --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.4 \ --with-universal-archs=ppc Then use: ./configure --with-python=/usr/local/python-2.6/bin/python2.6 --with-apxs=/opt/apache2/bin/apxs BTW, because when setting: CFLAGS='-arch ppc' MACOSX_DEPLOYMENT_TARGET=10.4 you hadn't exported them, they wouldn't have done anything. Neither are probably required anyway. Finally, Apache under /opt is not furnished by Apache but is most likely MacPorts version. Presence of MacPorts stuff always seems to give problems. :-( Graham cheers -frank On Apr 16, 1:10 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Can you also post what the values of LDFLAGS and LDLIBS in the generated Makefile in mod_wsgi source directory are after having run configure. Graham 2009/4/16 Graham Dumpleton graham.dumple...@gmail.com: What do you get when you run: otool -L mod_wsgi.so Graham 2009/4/16 frank h. frank.hoffsum...@gmail.com: Hi I am trying to install mod_wsgi 2.4 on my PPC Mac OS X 10.4 Server machine. There is an apache2 living under /opt, furnished by Apple since Apache is $ file /opt/apache2/bin/httpd /opt/apache2/bin/httpd: Mach-O executable ppc I compiled my own Python 2.6.2 like this: curl -Ohttp://python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2 bzip2 -d Python-2.6.2.tar.bz2 tar xf Python-2.6.2.tar cd Python-2.6.2 unset DYLD_LIBRARY_PATH unset LD_LIBRARY_PATH CFLAGS='-arch ppc' MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework=/Library/Frameworks make sudo make install $ file /Library/Frameworks/Python.framework/Versions/2.6/Python /Library/Frameworks/Python.framework/Versions/2.6/Python: Mach-O dynamically linked shared library ppc then I compiled mod_wsgi as follows export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --with-apxs=/opt/apache2/bin/apxs --with-python=/Library/ Frameworks/Python.framework/Versions/2.6/bin/python make sudo make install $ file /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: Mach-O bundle ppc then I change /opt/apache2/conf/http.conf to contain the line LoadModule wsgi_module modules/mod_wsgi.so trying to start apache, I get the following error $ sudo /opt/apache2/bin/apachectl start Syntax error on line 271 of /opt/apache2/conf/httpd.conf: Cannot load /opt/apache2/modules/mod_wsgi.so into server: Symbol not found: _PyExc_KeyError\n Referenced from: /opt/apache2/modules/ mod_wsgi.so\n Expected in: dynamic lookup\n not sure what is wrong there, any insight is much appreciated! thanks, -frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Intermittent NoReverseMatch errors
When you say 'Also, I get no errors if I remove the maximum-requests', is that on all configurations? When you run your tests, are requests always sequential? Ie., no concurrent requests. Does it make a difference if you specify: WSGIApplicationGroup %{GLOBAL} Finally, what other third party C extension modules do you use besides GeoDjango? Ie., databases, etc. Do you use ctypes module? Graham 2009/4/16 Alex Robbins alexander.j.robb...@gmail.com: The urls that not working aren't using anything except the plain django 1.0.2. (No GeoDjango). So it could be django. How would increasing the max requests make it more thread-safe? On Apr 15, 4:03 pm, Ariel Mauricio Nunez Gomez ingenieroar...@gmail.com wrote: Bah, I didn't realize it was an old thread, the OP must have solved his issue by now. Alex, are you using any library that is not thread safe? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Symbol not found: _PyExc_KeyError
If still no joy, can you replace the 'configure' script for mod_wsgi with: http://modwsgi.googlecode.com/svn/branches/mod_wsgi-2.X/configure This addresses a problem with MacPorts Python 2.6, but maybe the problem actually lies more with Python 2.6 itself rather than the MacPorts version. For MacPorts Python though, one doesn't see the same symptoms, but just that wrong version of Python framework used. The MacPorts Python problem is explained toward end of: http://code.google.com/p/modwsgi/issues/detail?id=28 Time for me to sleep. I'll see how you went in the morning. Graham 2009/4/16 Graham Dumpleton graham.dumple...@gmail.com: 2009/4/16 frank h. frank.hoffsum...@gmail.com: Graham, thanks for your help, here comes the output $ grep LD Makefile LDFLAGS = -F/Library/Frameworks -framework Python -u _PyMac_Error - arch ppc LDLIBS = -ldl $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $(LDLIBS) $ otool -L /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) Hmmm, lacking dependency on Python framework, which is why symbol obviously coming up undefined. What is in the directory: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config ie., run 'ls -las' in that directory. Can you also possibly not install the Python version into /Library. Instead use: ./configure --prefix=/usr/local/python-2.6 \ --enable-framework=/usr/local/python-2.6/frameworks \ --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.4 \ --with-universal-archs=ppc Then use: ./configure --with-python=/usr/local/python-2.6/bin/python2.6 --with-apxs=/opt/apache2/bin/apxs BTW, because when setting: CFLAGS='-arch ppc' MACOSX_DEPLOYMENT_TARGET=10.4 you hadn't exported them, they wouldn't have done anything. Neither are probably required anyway. Finally, Apache under /opt is not furnished by Apache but is most likely MacPorts version. Presence of MacPorts stuff always seems to give problems. :-( Graham cheers -frank On Apr 16, 1:10 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: Can you also post what the values of LDFLAGS and LDLIBS in the generated Makefile in mod_wsgi source directory are after having run configure. Graham 2009/4/16 Graham Dumpleton graham.dumple...@gmail.com: What do you get when you run: otool -L mod_wsgi.so Graham 2009/4/16 frank h. frank.hoffsum...@gmail.com: Hi I am trying to install mod_wsgi 2.4 on my PPC Mac OS X 10.4 Server machine. There is an apache2 living under /opt, furnished by Apple since Apache is $ file /opt/apache2/bin/httpd /opt/apache2/bin/httpd: Mach-O executable ppc I compiled my own Python 2.6.2 like this: curl -Ohttp://python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2 bzip2 -d Python-2.6.2.tar.bz2 tar xf Python-2.6.2.tar cd Python-2.6.2 unset DYLD_LIBRARY_PATH unset LD_LIBRARY_PATH CFLAGS='-arch ppc' MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework=/Library/Frameworks make sudo make install $ file /Library/Frameworks/Python.framework/Versions/2.6/Python /Library/Frameworks/Python.framework/Versions/2.6/Python: Mach-O dynamically linked shared library ppc then I compiled mod_wsgi as follows export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --with-apxs=/opt/apache2/bin/apxs --with-python=/Library/ Frameworks/Python.framework/Versions/2.6/bin/python make sudo make install $ file /opt/apache2/modules/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so: Mach-O bundle ppc then I change /opt/apache2/conf/http.conf to contain the line LoadModule wsgi_module modules/mod_wsgi.so trying to start apache, I get the following error $ sudo /opt/apache2/bin/apachectl start Syntax error on line 271 of /opt/apache2/conf/httpd.conf: Cannot load /opt/apache2/modules/mod_wsgi.so into server: Symbol not found: _PyExc_KeyError\n Referenced from: /opt/apache2/modules/ mod_wsgi.so\n Expected in: dynamic lookup\n not sure what is wrong there, any insight is much appreciated! thanks, -frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Is this correct way for using mod_wsgi
Dear Graham, Thanks for the reply.I installed mod_wsgi with MPM worker and it works now.But I could not see the differences, regarding memory using, when MPM worker is used in comparison with MPM prefork.Must I change mod_wsgi setting anyhow? I use daemon mode with processes=3 threads=1 Thank you for help L. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Intermittent NoReverseMatch errors
I'm going to try your suggestion (single threaded, multiprocess) and see what happens. Remember process are expensive, so start with a low number and increase as needed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---
[modwsgi] Re: Is this correct way for using mod_wsgi
2009/4/17 Johny pyt...@hope.cz: Dear Graham, Thanks for the reply.I installed mod_wsgi with MPM worker and it works now.But I could not see the differences, regarding memory using, when MPM worker is used in comparison with MPM prefork.Must I change mod_wsgi setting anyhow? I use daemon mode with processes=3 threads=1 If using mod_wsgi daemon mode, whether you use prefork or worker MPM doesn't really matter. If you don't have to support use of PHP on same web server however, you are better off using worker MPM. For some of the issues that come up with prefork MPM, especially if you happened to be using embedded mode, see: http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html Also have a read of: http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading This explains a bit about the different modes of mod_wsgi and the different Apache MPMs. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~--~~~~--~~--~--~---