Re: FastCGI Problems
Finally got everything tweaked (sort of). I needed to add a RewriteBase directive to .htaccss, amend httpd.conf to use FastCGIServer and not FAstCGIEXternalServer. That then gave me bind permission denied errors, which I was only able to resolve by putting selinux into permissive mode, which I'm not entirely happy about. N. On Tuesday, 17 July 2012 22:00:33 UTC+1, Newt wrote: > > I've spent a little more time on this, and I've been trying out python > mysite.fcgi > > I've now got: > > os.environ["DJANGO_SETTINGS_MODULE"] = "settings" > > That seems to get python mysite.fcgi, to work better, but I now have > errors: > > WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! > WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! > WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! > WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! > > I'm hoping that once I have those resolved so that python mysite.fcgi runs > with no errors, then perhaps the website will also work... > > N. > > On Tuesday, July 17, 2012 12:01:00 AM UTC+1, Jarrett Chisholm wrote: >> >> Hey Newt, >> >> not sure if this is your problem, but I think >> >> os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" >> >> should be >> >> os.environ["DJANGO_SETTINGS_MODULE"] = "proj1.settings" >> >> good luck >> >> On Saturday, 14 July 2012 14:05:35 UTC-4, Newt wrote: >>> >>> (Sorry if this is a repost - it isn't showing up in the groups for me) >>> >>> I've tried to set up Django to use a sub-directory on my local PC - I'm >>> using Apache2.0. >>> >>> This is the relevant part from httpd.conf: >>> >>> Alias /django /stuff/django/proj1/proj1 >>> >>> >>> Options +execCGI >>> AllowOverride FileInfo >>> Order allow,deny >>> Allow from all >>> >>> >>> This is from .htaccess: >>> >>> AddHandler fastcgi-script .fcgi >>> >>> RewriteEngine On >>> RewriteCond %{REQUEST_FILENAME} !-f >>> RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] >>> >>> And this is mysite.fcgi >>> >>> #!/usr/bin/python >>> >>> import os,sys >>> >>> #sys.path.insert(0, "/stuff/django/proj1/proj1") >>> sys.path.append('/stuff/django/proj1') >>> sys.path.append('/stuff/django/proj1/proj1') >>> #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "proj1.settings") >>> >>> os.chdir("/stuff/django/proj1/proj1") >>> >>> os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" >>> >>> from django.core.servers.fastcgi import runfastcgi >>> runfastcgi(method="threaded", daemonize="false") >>> >>> However, accessing http://localhost/django gives: >>> >>> Not Found >>> >>> The requested URL /stuff/django/proj1/proj1/mysite.fcgi/ was not found >>> on this server. >>> -- >>> Apache/2.2.15 (Scientific Linux) Server at localhost Port 80 >>> Can anyone spot what I've got configured wrongly? >>> TIA, N. >>> >> On Tuesday, 17 July 2012 22:00:33 UTC+1, Newt wrote: > > I've spent a little more time on this, and I've been trying out python > mysite.fcgi > > I've now got: > > os.environ["DJANGO_SETTINGS_MODULE"] = "settings" > > That seems to get python mysite.fcgi, to work better, but I now have > errors: > > WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! > WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! > WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! > WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! > > I'm hoping that once I have those resolved so that python mysite.fcgi runs > with no errors, then perhaps the website will also work... > > N. > > On Tuesday, July 17, 2012 12:01:00 AM UTC+1, Jarrett Chisholm wrote: >> >> Hey Newt, >> >> not sure if this is your problem, but I think >> >> os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" >> >> should be >> >> os.environ["DJANGO_SETTINGS_MODULE"] = "proj1.settings" >> >> good luck >> >> On Saturday, 14 July 2012 14:05:35 UTC-4, Newt wrote: >>> >>> (Sorry if this is a repost - it isn't showing up in the groups for me) >>> >>> I've tried to set up Django to use a sub-directory on my local PC - I'm >>> using Apache2.0. >>> >>> This is the relevant part from httpd.conf: >>> >>> Alias /django /stuff/django/proj1/proj1 >>> >>> >>> Options +execCGI >>> AllowOverride FileInfo >>> Order allow,deny >>> Allow from all >>> >>> >>> This is from .htaccess: >>> >>> AddHandler fastcgi-script .fcgi >>> >>> RewriteEngine On >>> RewriteCond %{REQUEST_FILENAME} !-f >>> RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] >>> >>> And this is mysite.fcgi >>> >>> #!/usr/bin/python >>> >>> import os,sys >>> >>> #sys.path.insert(0, "/stuff/django/proj1/proj1") >>> sys.path.append('/stuff/django/proj1') >>> sys.path.append('/stuff/django/proj1/proj1') >>> #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "proj1.settings") >>> >>> os.chdir("/stuff/django/proj1/proj1") >>> >>> os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" >>> >>> from
Re: FastCGI Problems
I've spent a little more time on this, and I've been trying out python mysite.fcgi I've now got: os.environ["DJANGO_SETTINGS_MODULE"] = "settings" That seems to get python mysite.fcgi, to work better, but I now have errors: WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! I'm hoping that once I have those resolved so that python mysite.fcgi runs with no errors, then perhaps the website will also work... N. On Tuesday, July 17, 2012 12:01:00 AM UTC+1, Jarrett Chisholm wrote: > > Hey Newt, > > not sure if this is your problem, but I think > > os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" > > should be > > os.environ["DJANGO_SETTINGS_MODULE"] = "proj1.settings" > > good luck > > On Saturday, 14 July 2012 14:05:35 UTC-4, Newt wrote: >> >> (Sorry if this is a repost - it isn't showing up in the groups for me) >> >> I've tried to set up Django to use a sub-directory on my local PC - I'm >> using Apache2.0. >> >> This is the relevant part from httpd.conf: >> >> Alias /django /stuff/django/proj1/proj1 >> >> >> Options +execCGI >> AllowOverride FileInfo >> Order allow,deny >> Allow from all >> >> >> This is from .htaccess: >> >> AddHandler fastcgi-script .fcgi >> >> RewriteEngine On >> RewriteCond %{REQUEST_FILENAME} !-f >> RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] >> >> And this is mysite.fcgi >> >> #!/usr/bin/python >> >> import os,sys >> >> #sys.path.insert(0, "/stuff/django/proj1/proj1") >> sys.path.append('/stuff/django/proj1') >> sys.path.append('/stuff/django/proj1/proj1') >> #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "proj1.settings") >> >> os.chdir("/stuff/django/proj1/proj1") >> >> os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" >> >> from django.core.servers.fastcgi import runfastcgi >> runfastcgi(method="threaded", daemonize="false") >> >> However, accessing http://localhost/django gives: >> >> Not Found >> >> The requested URL /stuff/django/proj1/proj1/mysite.fcgi/ was not found on >> this server. >> -- >> Apache/2.2.15 (Scientific Linux) Server at localhost Port 80 >> Can anyone spot what I've got configured wrongly? >> TIA, N. >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/6GDfI8f0xlMJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: FastCGI Problems
Hey Newt, not sure if this is your problem, but I think os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" should be os.environ["DJANGO_SETTINGS_MODULE"] = "proj1.settings" good luck On Saturday, 14 July 2012 14:05:35 UTC-4, Newt wrote: > > (Sorry if this is a repost - it isn't showing up in the groups for me) > > I've tried to set up Django to use a sub-directory on my local PC - I'm > using Apache2.0. > > This is the relevant part from httpd.conf: > > Alias /django /stuff/django/proj1/proj1 > > > Options +execCGI > AllowOverride FileInfo > Order allow,deny > Allow from all > > > This is from .htaccess: > > AddHandler fastcgi-script .fcgi > > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > And this is mysite.fcgi > > #!/usr/bin/python > > import os,sys > > #sys.path.insert(0, "/stuff/django/proj1/proj1") > sys.path.append('/stuff/django/proj1') > sys.path.append('/stuff/django/proj1/proj1') > #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "proj1.settings") > > os.chdir("/stuff/django/proj1/proj1") > > os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" > > from django.core.servers.fastcgi import runfastcgi > runfastcgi(method="threaded", daemonize="false") > > However, accessing http://localhost/django gives: > > Not Found > > The requested URL /stuff/django/proj1/proj1/mysite.fcgi/ was not found on > this server. > -- > Apache/2.2.15 (Scientific Linux) Server at localhost Port 80 > Can anyone spot what I've got configured wrongly? > TIA, N. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/qlqtKrbSVJYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
FastCGI Problems
(Sorry if this is a repost - it isn't showing up in the groups for me) I've tried to set up Django to use a sub-directory on my local PC - I'm using Apache2.0. This is the relevant part from httpd.conf: Alias /django /stuff/django/proj1/proj1 Options +execCGI AllowOverride FileInfo Order allow,deny Allow from all This is from .htaccess: AddHandler fastcgi-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] And this is mysite.fcgi #!/usr/bin/python import os,sys #sys.path.insert(0, "/stuff/django/proj1/proj1") sys.path.append('/stuff/django/proj1') sys.path.append('/stuff/django/proj1/proj1') #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "proj1.settings") os.chdir("/stuff/django/proj1/proj1") os.environ["DJANGO_SETTINGS_MODULE"] = "settings.py" from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") However, accessing http://localhost/django gives: Not Found The requested URL /stuff/django/proj1/proj1/mysite.fcgi/ was not found on this server. -- Apache/2.2.15 (Scientific Linux) Server at localhost Port 80 Can anyone spot what I've got configured wrongly? TIA, N. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/KUdludig6I4J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
fastcgi problems
I'm using apache2.0+mod_fastcgi with flup prefork django 0.95+. With large requests we see an error return from the server (not django), but using top I can see the python process (presumably for the large request) ticking away using up lots of memory/cpu. At some point the python process stalls (I think because it wants to write to the now defunct pipe or whatever). I see these messages in the apache error log FastCGI: comm with server "/...fcgi" aborted: idle timeout (30 sec), referer: FastCGI: incomplete headers (0 bytes) received from server "/...fcgi", referer: so I'm guessing that the apache end of the fastcgi pipe is timing out. Is there a way for the django/flup side to signal that the request is not dead. I find it a bit strange that the django side doesn't seem to care about whether the apache side is alive or dead. -- Robin Becker --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
Yes. I finally did get it to work. But my issues weren't database related. Turned out to be something fairly simple with .htaccess as I suspected. (I'm not even up to the point of database access yet. And I'll be using PostgreSQL as that's what I know.) Michael Ralf wrote: > Did you get your Django site to work? What database are you using? > > I'm also trying to get Django to work on hostmonster.com, but I'm > having trouble with the MySQL backend, it doesn't seem to be > installed. > > I tried manually installing it (copying files), but I get this error: > > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/flup/server/fcgi_base.py", line 558, in run > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: protocolStatus, > appStatus = self.server.handler(self) > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/flup/server/fcgi_base.py", line 1116, in handler > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: result = > self.application(environ, start_response) > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/django/core/handlers/wsgi.py", line 184, in __call__ > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: > self.load_middleware() > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/django/core/handlers/base.py", line 29, in > load_middleware > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: mod = > __import__(mw_module, {}, {}, ['']) > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/django/contrib/sessions/middleware.py", line 2, in ? > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: from > django.contrib.sessions.models import Session > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/django/contrib/sessions/models.py", line 3, in ? > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: from django.db > import models > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/django/db/__init__.py", line 11, in ? > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: backend = > __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, > {}, {}, ['']) > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ > tourista/python/django/db/backends/mysql/base.py", line 12, in ? > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: raise > ImproperlyConfigured, "Error loading MySQLdb module: %s" % e > [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: > ImproperlyConfigured: Error loading MySQLdb module: /home/tourista/ > python/_mysql.so: cannot open shared object file: No such file or > director > > I guess I'll need to recompile from source on the server, but I don't > have ssh access yet. > > Ralf > > > On Jan 8, 8:32 am, Michael Hipp <[EMAIL PROTECTED]> wrote: >> Michael Hipp wrote: >>> Hello, >>> I'm hoping to rework my website into Django, but am having trouble at my >>> shared hosting provider (HostMonster). >>> They don't support mod_python, so Hostmonster said to add this to .htaccess >>> for FastCGI: >>>AddHandler fcgid-script .fcgi >>> I did that and my html sites still work, but when I add the recommendations >>> from Django my html sites don't work and neither does my fledgling Django >>> site. >>>AddHandler fastcgi-script .fcgi >>>RewriteEngine On >>>RewriteCond %{REQUEST_FILENAME} !-f >>>RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] >>> I also did the mysite.fcgi file. My Django site just returns blank pages. >>> The >>> html sites get an 'Internal Server Error'. >> Thanks to help from this list the Django site is now funcitonal. But the >> old html sites still return Internal Server Errors. Here's what in >> the logs: >> >> [Mon Jan 07 23:28:15 2008] [error] [client 75.116.4.1] Request exceeded >> the limit of 10 internal redirects due to probable configuration error. >> Use 'LimitInternalRecursion' to increase the limit if necessary. Use >> 'LogLevel debug' to get a backtrace. >> >> I assume this is a function of the .htaccess file. How do I get it to >> route around django for the html sites? >> >> Thanks, >> Michael > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
Did you get your Django site to work? What database are you using? I'm also trying to get Django to work on hostmonster.com, but I'm having trouble with the MySQL backend, it doesn't seem to be installed. I tried manually installing it (copying files), but I get this error: [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/flup/server/fcgi_base.py", line 558, in run [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: protocolStatus, appStatus = self.server.handler(self) [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/flup/server/fcgi_base.py", line 1116, in handler [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: result = self.application(environ, start_response) [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/django/core/handlers/wsgi.py", line 184, in __call__ [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: self.load_middleware() [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/django/core/handlers/base.py", line 29, in load_middleware [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: mod = __import__(mw_module, {}, {}, ['']) [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/django/contrib/sessions/middleware.py", line 2, in ? [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: from django.contrib.sessions.models import Session [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/django/contrib/sessions/models.py", line 3, in ? [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: from django.db import models [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/django/db/__init__.py", line 11, in ? [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: backend = __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, {}, {}, ['']) [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: File "/home/ tourista/python/django/db/backends/mysql/base.py", line 12, in ? [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: raise ImproperlyConfigured, "Error loading MySQLdb module: %s" % e [Mon Jan 14 03:17:20 2008] [warn] mod_fcgid: stderr: ImproperlyConfigured: Error loading MySQLdb module: /home/tourista/ python/_mysql.so: cannot open shared object file: No such file or director I guess I'll need to recompile from source on the server, but I don't have ssh access yet. Ralf On Jan 8, 8:32 am, Michael Hipp <[EMAIL PROTECTED]> wrote: > Michael Hipp wrote: > > Hello, > > > I'm hoping to rework my website into Django, but am having trouble at my > > shared hosting provider (HostMonster). > > > They don't support mod_python, so Hostmonster said to add this to .htaccess > > for FastCGI: > > >AddHandler fcgid-script .fcgi > > > I did that and my html sites still work, but when I add the recommendations > > from Django my html sites don't work and neither does my fledgling Django > > site. > > >AddHandler fastcgi-script .fcgi > >RewriteEngine On > >RewriteCond %{REQUEST_FILENAME} !-f > >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > > I also did the mysite.fcgi file. My Django site just returns blank pages. > > The > > html sites get an 'Internal Server Error'. > > Thanks to help from this list the Django site is now funcitonal. But the > old html sites still return Internal Server Errors. Here's what in > the logs: > > [Mon Jan 07 23:28:15 2008] [error] [client 75.116.4.1] Request exceeded > the limit of 10 internal redirects due to probable configuration error. > Use 'LimitInternalRecursion' to increase the limit if necessary. Use > 'LogLevel debug' to get a backtrace. > > I assume this is a function of the .htaccess file. How do I get it to > route around django for the html sites? > > Thanks, > Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
Michael Hipp wrote: > Hello, > > I'm hoping to rework my website into Django, but am having trouble at my > shared hosting provider (HostMonster). > > They don't support mod_python, so Hostmonster said to add this to .htaccess > for FastCGI: > >AddHandler fcgid-script .fcgi > > I did that and my html sites still work, but when I add the recommendations > from Django my html sites don't work and neither does my fledgling Django > site. > >AddHandler fastcgi-script .fcgi >RewriteEngine On >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > I also did the mysite.fcgi file. My Django site just returns blank pages. The > html sites get an 'Internal Server Error'. Thanks to help from this list the Django site is now funcitonal. But the old html sites still return Internal Server Errors. Here's what in the logs: [Mon Jan 07 23:28:15 2008] [error] [client 75.116.4.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. I assume this is a function of the .htaccess file. How do I get it to route around django for the html sites? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
That worked! Thank you! Thank you all! Michael Muchanic wrote: > Try adding the .egg to sys.path explicitly, i.e. > > sys.path.insert(0, "/home/redmulec/python/flup-1.0-py2.4.egg") --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
Try adding the .egg to sys.path explicitly, i.e. sys.path.insert(0, "/home/redmulec/python/flup-1.0-py2.4.egg") On Jan 8, 6:51 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > >> Does any of that offer any clues? > > > Not really. You really need to do what Milan said back at the > > beginning. See if you can get the actual error messages logged in the > > Apache error log files for the request, plus post your .fcgi file. > > Well, I'm making progress. It's now giving me some error messages: > > -- > ERROR: No module named flup Unable to load the flup package. In order to > run django as a FastCGI application, you will need to get flup > fromhttp://www.saddi.com/software/flup/If you've already installed flup, > then make sure you have it in your PYTHONPATH. > -- > > So I added some print statements > -- > ['/home/redmulec/djcode', '/home/redmulec/djtrunk', > '/home/redmulec/python', '/home/redmulec/public_html', > '/usr/lib64/python23.zip', '/usr/lib64/python2.3', > '/usr/lib64/python2.3/plat-linux2', '/usr/lib64/python2.3/lib-tk', > '/usr/lib64/python2.3/lib-dynload', > '/usr/lib64/python2.3/site-packages', > '/usr/lib64/python2.3/site-packages/gtk-2.0', > '/usr/lib/python2.3/site-packages'] Traceback (most recent call last): > File "redmule.fcgi", line 10, in ? import flup ImportError: No module > named flup [Mon Jan 07 22:47:07 2008] [warn] (104)Connection reset by > peer: mod_fcgid: read data from fastcgi server error. [Mon Jan 07 > 22:47:07 2008] [error] [client 75.116.4.1] Premature end of script > headers: redmule.fcgi [Mon Jan 07 22:47:07 2008] [error] [client > 75.116.4.1] suexec failure: could not open log file [Mon Jan 07 22:47:07 > 2008] [error] [client 75.116.4.1] fopen: Permission denied [Mon Jan 07 > 22:47:07 2008] [error] [client 75.116.4.1] Premature end of script > headers: 500.php [Mon Jan 07 22:47:10 2008] [notice] mod_fcgid: process > /home/redmulec/public_html/redmule.fcgi(16629) exit(communication > error), terminated by calling exit(), return code: 1 > -- > > So it's obvious something is fubar with flup. But from the command line > it runs fine: > > $ python > Python 2.4.3 (#1, Nov 15 2007, 14:40:32) > [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import flup > >>> > > Probably a PYTHONPATH problem. But it looks below as if my PYTHONPATH > should be fine. I've installed flup in ~/python. > > $ ls -lh ~/python > total 884K > -rwxr-xr-x 1 redmulec redmulec 286 Jan 7 22:15 easy_install > -rwxr-xr-x 1 redmulec redmulec 294 Jan 7 22:15 easy_install-2.4 > -rw-rw-r-- 1 redmulec redmulec 235 Jan 7 22:19 easy-install.pth > drwxrwxr-x 2 redmulec redmulec 4.0K Jan 6 09:56 eunuchs > -rw-rw-r-- 1 redmulec redmulec 8.8K Sep 4 10:48 ez_setup.py > -rwxrwxr-x 1 redmulec redmulec 371K Jan 6 09:54 flup-1.0-py2.3.egg > -rw-rw-r-- 1 redmulec redmulec 133K Jan 7 22:19 flup-1.0-py2.4.egg > drwxrwxr-x 4 redmulec redmulec 4.0K Jan 7 22:13 setuptools-0.6c6-py2.3.egg > -rw-rw-r-- 1 redmulec redmulec 320K Jan 7 22:13 setuptools-0.6c7-py2.4.egg > -rw-rw-r-- 1 redmulec redmulec 29 Jan 7 22:15 setuptools.pth > -rw-rw-r-- 1 redmulec redmulec 2.4K Jan 6 09:48 site.py > -rw-rw-r-- 1 redmulec redmulec 1.8K Jan 7 21:36 site.pyc > > My .fcgi file: > -- > #!/usr/bin/python > import sys, os > > # Add a custom Python path. > sys.path.insert(0, "/home/redmulec/python") > sys.path.insert(0, "/home/redmulec/djtrunk") > sys.path.insert(0, "/home/redmulec/djcode") > > print sys.path > import flup > > # Switch to the directory of your project. (Optional.) > os.chdir("/home/redmulec/djcode") > > # Set the DJANGO_SETTINGS_MODULE environment variable. > os.environ['DJANGO_SETTINGS_MODULE'] = "redmule.settings" > > from django.core.servers.fastcgi import runfastcgi > runfastcgi(method="threaded", daemonize="false") > -- > > How can I convince this thing that flup is indeed installed? > > Is it because it's installed as an egg? > > Thanks, > Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
Graham Dumpleton wrote: > On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: >> Does any of that offer any clues? > > Not really. You really need to do what Milan said back at the > beginning. See if you can get the actual error messages logged in the > Apache error log files for the request, plus post your .fcgi file. Well, I'm making progress. It's now giving me some error messages: -- ERROR: No module named flup Unable to load the flup package. In order to run django as a FastCGI application, you will need to get flup from http://www.saddi.com/software/flup/ If you've already installed flup, then make sure you have it in your PYTHONPATH. -- So I added some print statements -- ['/home/redmulec/djcode', '/home/redmulec/djtrunk', '/home/redmulec/python', '/home/redmulec/public_html', '/usr/lib64/python23.zip', '/usr/lib64/python2.3', '/usr/lib64/python2.3/plat-linux2', '/usr/lib64/python2.3/lib-tk', '/usr/lib64/python2.3/lib-dynload', '/usr/lib64/python2.3/site-packages', '/usr/lib64/python2.3/site-packages/gtk-2.0', '/usr/lib/python2.3/site-packages'] Traceback (most recent call last): File "redmule.fcgi", line 10, in ? import flup ImportError: No module named flup [Mon Jan 07 22:47:07 2008] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Mon Jan 07 22:47:07 2008] [error] [client 75.116.4.1] Premature end of script headers: redmule.fcgi [Mon Jan 07 22:47:07 2008] [error] [client 75.116.4.1] suexec failure: could not open log file [Mon Jan 07 22:47:07 2008] [error] [client 75.116.4.1] fopen: Permission denied [Mon Jan 07 22:47:07 2008] [error] [client 75.116.4.1] Premature end of script headers: 500.php [Mon Jan 07 22:47:10 2008] [notice] mod_fcgid: process /home/redmulec/public_html/redmule.fcgi(16629) exit(communication error), terminated by calling exit(), return code: 1 -- So it's obvious something is fubar with flup. But from the command line it runs fine: $ python Python 2.4.3 (#1, Nov 15 2007, 14:40:32) [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import flup >>> Probably a PYTHONPATH problem. But it looks below as if my PYTHONPATH should be fine. I've installed flup in ~/python. $ ls -lh ~/python total 884K -rwxr-xr-x 1 redmulec redmulec 286 Jan 7 22:15 easy_install -rwxr-xr-x 1 redmulec redmulec 294 Jan 7 22:15 easy_install-2.4 -rw-rw-r-- 1 redmulec redmulec 235 Jan 7 22:19 easy-install.pth drwxrwxr-x 2 redmulec redmulec 4.0K Jan 6 09:56 eunuchs -rw-rw-r-- 1 redmulec redmulec 8.8K Sep 4 10:48 ez_setup.py -rwxrwxr-x 1 redmulec redmulec 371K Jan 6 09:54 flup-1.0-py2.3.egg -rw-rw-r-- 1 redmulec redmulec 133K Jan 7 22:19 flup-1.0-py2.4.egg drwxrwxr-x 4 redmulec redmulec 4.0K Jan 7 22:13 setuptools-0.6c6-py2.3.egg -rw-rw-r-- 1 redmulec redmulec 320K Jan 7 22:13 setuptools-0.6c7-py2.4.egg -rw-rw-r-- 1 redmulec redmulec 29 Jan 7 22:15 setuptools.pth -rw-rw-r-- 1 redmulec redmulec 2.4K Jan 6 09:48 site.py -rw-rw-r-- 1 redmulec redmulec 1.8K Jan 7 21:36 site.pyc My .fcgi file: -- #!/usr/bin/python import sys, os # Add a custom Python path. sys.path.insert(0, "/home/redmulec/python") sys.path.insert(0, "/home/redmulec/djtrunk") sys.path.insert(0, "/home/redmulec/djcode") print sys.path import flup # Switch to the directory of your project. (Optional.) os.chdir("/home/redmulec/djcode") # Set the DJANGO_SETTINGS_MODULE environment variable. os.environ['DJANGO_SETTINGS_MODULE'] = "redmule.settings" from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") -- How can I convince this thing that flup is indeed installed? Is it because it's installed as an egg? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > >>RewriteRule ^djangosite/(.*)$ mysite.fcgi/$1 [QSA,L] > > >> would only use the fcgi stuff on the urls that resolved to the > >> djangosite directory??? > > > You cannot read the RewriteRule in isolation, the RewriteCond on the > > line before must be taken into consideration as well: > > >RewriteCond %{REQUEST_FILENAME} !-f > >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > > The RewriteCond says that the RewriteRule should only be applied in > > the target of the URL couldn't be mapped as a static file. > > > One problem with the rule as shown is that it may not necessarily work > > on all cases. Can be a problem where done in a .htaccess file and that > > directory isn't the root of the site. > > > If the URL of the directory is /dangosite, use instead: > > >RewriteCond %{REQUEST_FILENAME} !-f > >RewriteRule ^(.*)$ /djangosite/mysite.fcgi/$1 [QSA,PT,L] > > > The PT flag should be optional because absolute path for redirect, but > > makes it clearer when trying to look through mod_rewrite > > documentation. > > > The question thus is, are you doing the rewrite rule in a .htaccess > > file or not? Is that the root of the site? > > Thanks, Graham. > > Yes, I'm doing it in .htaccess. > > The root of the website (the nix system path) is: /home/mysite > > The www stuff is stored at: /home/mysite/public_html > > That's also where .htaccess and mysite.fcgi both live. > > If I do that RewriteRule as > >RewriteRule ^(.*)$ /mysite.com/mysite.fcgi/$1 [QSA,PT,L] > > I get an internal server error. > > If I do it as /mysite.fcgi or /home/mysite/public_html/mysite.fcgi then > it just returns a blank page. > > Does any of that offer any clues? Not really. You really need to do what Milan said back at the beginning. See if you can get the actual error messages logged in the Apache error log files for the request, plus post your .fcgi file. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
Graham Dumpleton wrote: >>RewriteRule ^djangosite/(.*)$ mysite.fcgi/$1 [QSA,L] >> >> would only use the fcgi stuff on the urls that resolved to the >> djangosite directory??? > > You cannot read the RewriteRule in isolation, the RewriteCond on the > line before must be taken into consideration as well: > >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > The RewriteCond says that the RewriteRule should only be applied in > the target of the URL couldn't be mapped as a static file. > > One problem with the rule as shown is that it may not necessarily work > on all cases. Can be a problem where done in a .htaccess file and that > directory isn't the root of the site. > > If the URL of the directory is /dangosite, use instead: > >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ /djangosite/mysite.fcgi/$1 [QSA,PT,L] > > The PT flag should be optional because absolute path for redirect, but > makes it clearer when trying to look through mod_rewrite > documentation. > > The question thus is, are you doing the rewrite rule in a .htaccess > file or not? Is that the root of the site? Thanks, Graham. Yes, I'm doing it in .htaccess. The root of the website (the nix system path) is: /home/mysite The www stuff is stored at: /home/mysite/public_html That's also where .htaccess and mysite.fcgi both live. If I do that RewriteRule as RewriteRule ^(.*)$ /mysite.com/mysite.fcgi/$1 [QSA,PT,L] I get an internal server error. If I do it as /mysite.fcgi or /home/mysite/public_html/mysite.fcgi then it just returns a blank page. Does any of that offer any clues? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
On Jan 6, 9:23 pm, kbochert <[EMAIL PROTECTED]> wrote: > On Jan 5, 5:46 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > I'm hoping to rework my website into Django, but am having trouble at my > > shared hosting provider (HostMonster). > > > They don't support mod_python, so Hostmonster said to add this to .htaccess > > for FastCGI: > > >AddHandler fcgid-script .fcgi > > > I did that and my html sites still work, but when I add the recommendations > > from Django my html sites don't work and neither does my fledgling Django > > site. > > >AddHandler fastcgi-script .fcgi > >RewriteEngine On > >RewriteCond %{REQUEST_FILENAME} !-f > >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > > I also did the mysite.fcgi file. My Django site just returns blank pages. > > The > > html sites get an 'Internal Server Error'. > > > I'm pretty sure my Django code works as it's just the simple stuff from > > chapter 2 and 3 and it works on the development server. > > > Any help? > > > Thanks, > > Michael > > I'm a beginner, and having my own fcgi problems but.. > You mention that your html site fails when yo add the rewrite rule to > htaccess. As I understand it, the line >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > tells Apache that any url (i.e. '^(.*)$') is to be handled via > mysite.fcgi, and so a sever error when trying to access an html file > seems unsurprising. Perhaps something like > >RewriteRule ^djangosite/(.*)$ mysite.fcgi/$1 [QSA,L] > > would only use the fcgi stuff on the urls that resolved to the > djangosite directory??? You cannot read the RewriteRule in isolation, the RewriteCond on the line before must be taken into consideration as well: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] The RewriteCond says that the RewriteRule should only be applied in the target of the URL couldn't be mapped as a static file. One problem with the rule as shown is that it may not necessarily work on all cases. Can be a problem where done in a .htaccess file and that directory isn't the root of the site. If the URL of the directory is /dangosite, use instead: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /djangosite/mysite.fcgi/$1 [QSA,PT,L] The PT flag should be optional because absolute path for redirect, but makes it clearer when trying to look through mod_rewrite documentation. The question thus is, are you doing the rewrite rule in a .htaccess file or not? Is that the root of the site? Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
[EMAIL PROTECTED] wrote: >> AddHandler fastcgi-script .fcgi > > Is this the actual name of your fcgi script? Also, there seems to be a > space before ".fcgi", which doesn't seem right. That line came directly from ... http://www.djangobook.com/en/1.0/chapter20/ http://www.djangoproject.com/documentation/fastcgi/ It appears to be correct from what I've seen from several sources. (But what I know about Apache wouldn't fill a thimble.) Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
On Jan 5, 5:46 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > Hello, > > I'm hoping to rework my website into Django, but am having trouble at my > shared hosting provider (HostMonster). > > They don't support mod_python, so Hostmonster said to add this to .htaccess > for FastCGI: > >AddHandler fcgid-script .fcgi > > I did that and my html sites still work, but when I add the recommendations > from Django my html sites don't work and neither does my fledgling Django > site. > >AddHandler fastcgi-script .fcgi >RewriteEngine On >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > I also did the mysite.fcgi file. My Django site just returns blank pages. The > html sites get an 'Internal Server Error'. > > I'm pretty sure my Django code works as it's just the simple stuff from > chapter 2 and 3 and it works on the development server. > > Any help? > > Thanks, > Michael I'm a beginner, and having my own fcgi problems but.. You mention that your html site fails when yo add the rewrite rule to htaccess. As I understand it, the line RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] tells Apache that any url (i.e. '^(.*)$') is to be handled via mysite.fcgi, and so a sever error when trying to access an html file seems unsurprising. Perhaps something like RewriteRule ^djangosite/(.*)$ mysite.fcgi/$1 [QSA,L] would only use the fcgi stuff on the urls that resolved to the djangosite directory??? (more expert comments welcomed) Karl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
> AddHandler fastcgi-script .fcgi Is this the actual name of your fcgi script? Also, there seems to be a space before ".fcgi", which doesn't seem right. Michael Hipp wrote: > Hello, > > I'm hoping to rework my website into Django, but am having trouble at my > shared hosting provider (HostMonster). > > They don't support mod_python, so Hostmonster said to add this to .htaccess > for FastCGI: > >AddHandler fcgid-script .fcgi > > I did that and my html sites still work, but when I add the recommendations > from Django my html sites don't work and neither does my fledgling Django > site. > >AddHandler fastcgi-script .fcgi >RewriteEngine On >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > I also did the mysite.fcgi file. My Django site just returns blank pages. The > html sites get an 'Internal Server Error'. > > I'm pretty sure my Django code works as it's just the simple stuff from > chapter 2 and 3 and it works on the development server. > > Any help? > > Thanks, > Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting with FastCGI, problems
On Jan 5, 7:46 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > Hello, > > I'm hoping to rework my website into Django, but am having trouble at my > shared hosting provider (HostMonster). > > They don't support mod_python, so Hostmonster said to add this to .htaccess > for FastCGI: > >AddHandler fcgid-script .fcgi > > I did that and my html sites still work, but when I add the recommendations > from Django my html sites don't work and neither does my fledgling Django > site. > >AddHandler fastcgi-script .fcgi >RewriteEngine On >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] > > I also did the mysite.fcgi file. My Django site just returns blank pages. The > html sites get an 'Internal Server Error'. > If your code is working fine with the development server ( manage.py runserver) then you can pretty much rule out a problem with your code. To get some help with this problem you'll need to post something from your apache error log since it sounds like that's where the stacktrace is going. And you should also post your mysite.fcgi script. You probably just need to double check your pythonpath, which you usually need to set in your .fcgi. I set mine like this: import sys sys.path.insert(0, "/home/me/sites/example.com/apps" ) sys.path.insert(0, "/home/me/lib/python" ) -- Milan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Shared hosting with FastCGI, problems
Hello, I'm hoping to rework my website into Django, but am having trouble at my shared hosting provider (HostMonster). They don't support mod_python, so Hostmonster said to add this to .htaccess for FastCGI: AddHandler fcgid-script .fcgi I did that and my html sites still work, but when I add the recommendations from Django my html sites don't work and neither does my fledgling Django site. AddHandler fastcgi-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] I also did the mysite.fcgi file. My Django site just returns blank pages. The html sites get an 'Internal Server Error'. I'm pretty sure my Django code works as it's just the simple stuff from chapter 2 and 3 and it works on the development server. Any help? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Strange FastCGI problems
No, not using @user_passes_test anywhere. Thanks though! On Dec 6, 1:43 pm, yml <[EMAIL PROTECTED]> wrote: > TP are you using @user_passes_test decorator with urlresolvers (url, > reverse ...). I had a problem similar to what you are describing and I > finally find out that this problem was infact related to the bug > described there:http://code.djangoproject.com/ticket/5925 > > I hope that help > > On Dec 6, 3:31 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > On Dec 6, 12:40 pm, TP <[EMAIL PROTECTED]> wrote: > > > > I thought I needed multiple Apache's since I frequently have several > > > concurrent requests. The actual dynamic python processing is quick, > > > but since clients could be connected for relatively long (slow > > > connections, etc), I thought I'd need multiple Apache's talking to > > > each. Since Django says it's not officially thread safe, I'm using the > > > prefork MPM in Apache. > > > Even in 'prefork' mode of Apache, there are multiple processes > > handling requests and so concurrent requests is not a problem. The > > problem with prefork though is that you can end up with lots of > > process, all consuming the maximum your Django application will use. > > > For memory constrained VPS systems, using 'worker' MPM is a better > > choice as you cut down on the number of Apache child processes and > > therefore memory, with concurrency then coming from multithreading, > > but also from fact that multiple processes still may also be running. > > > You might have a read of: > > > http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading > > > which talks about the different process/threading models that Apache > > provides and how mod_wsgi makes use of them and extends on them. > > > In respective of thread safety of Django, where does it say it is 'not > > officially thread safe'. I know that it is implied through fact they > > suggest prefork when using mod_python, but they also don't say to > > avoid mod_python on Windows, which is multithread, plus FASTCGI > > examples give examples using multithreading. So, there is actually > > conflicting information on the issue. > > > As explained in: > > > http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > > > the situation seems to be that there are no known current issues with > > Django itself in respect of multithreading. Thus, any multithread > > problems are more likely to come from the application built by a user > > using Django. So, it is just a matter of testing your application so > > you are satisfied that there isn't a problem. > > > > I looked at mod_wsgi and decided to try fastcgi since the Django docs > > > explicitly support it. But, given my problems perhaps I'll try > > > mod_wsgi next. > > > That there is nothing in Django documentation about mod_wsgi is more > > to do with no one offering up anything to add which mentions it. The > > Django documentation on mod_wsgi site is reasonably comprehensive and > > maybe even a link to that would be a good start. I haven't offered > > anything up myself for the Django site as believe that it has to be > > the Django developers/community that first need to work out whether > > they see it as a viable option and when they are happy add a link to > > it. > > > FWIW, people are using mod_wsgi quite happily with Django. I know of a > > couple of notable Django sites which are delaying looking at moving > > until mod_wsgi 2.0 is released as that will be the first version which > > allows Python code to be used to implement Apache HTTP authentication > > provider. For what those sites do, having that feature is critical and > > they can't move away from mod_python until mod_wsgi provides an > > equivalent mechanism. > > > Graham > > > > On Dec 5, 8:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > > wrote: > > > > > On Dec 6, 12:04 pm, TP <[EMAIL PROTECTED]> wrote: > > > > > > I've been using Django for the past few months and had great results > > > > > with Apache and mod_python. However, I'd like to try and reduce the > > > > > amount of memory that is used by having multiple Apache's each with > > > > > their own copy of my application. I decided to try mod_fastcgi in > > > > > Apache and Django's FastCGI server capability. > > > > > Why have multiple Apache's if using mod_fastcgi. You should be able to > > > > hang multiple FASTCGI hosted applications hanging off the one Apache. > > > > > BTW, you might also want to look at mod_wsgi. Allows you to run Django > > > > in separate process of their own just like FASTCGI, but everything > > > > still managed by Apache without the need for you to separately start > > > > Django or use any supervisor system to keep it running. > > > > > Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL
Re: Strange FastCGI problems
TP are you using @user_passes_test decorator with urlresolvers (url, reverse ...). I had a problem similar to what you are describing and I finally find out that this problem was infact related to the bug described there: http://code.djangoproject.com/ticket/5925 I hope that help On Dec 6, 3:31 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Dec 6, 12:40 pm, TP <[EMAIL PROTECTED]> wrote: > > > I thought I needed multiple Apache's since I frequently have several > > concurrent requests. The actual dynamic python processing is quick, > > but since clients could be connected for relatively long (slow > > connections, etc), I thought I'd need multiple Apache's talking to > > each. Since Django says it's not officially thread safe, I'm using the > > prefork MPM in Apache. > > Even in 'prefork' mode of Apache, there are multiple processes > handling requests and so concurrent requests is not a problem. The > problem with prefork though is that you can end up with lots of > process, all consuming the maximum your Django application will use. > > For memory constrained VPS systems, using 'worker' MPM is a better > choice as you cut down on the number of Apache child processes and > therefore memory, with concurrency then coming from multithreading, > but also from fact that multiple processes still may also be running. > > You might have a read of: > > http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading > > which talks about the different process/threading models that Apache > provides and how mod_wsgi makes use of them and extends on them. > > In respective of thread safety of Django, where does it say it is 'not > officially thread safe'. I know that it is implied through fact they > suggest prefork when using mod_python, but they also don't say to > avoid mod_python on Windows, which is multithread, plus FASTCGI > examples give examples using multithreading. So, there is actually > conflicting information on the issue. > > As explained in: > > http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > > the situation seems to be that there are no known current issues with > Django itself in respect of multithreading. Thus, any multithread > problems are more likely to come from the application built by a user > using Django. So, it is just a matter of testing your application so > you are satisfied that there isn't a problem. > > > I looked at mod_wsgi and decided to try fastcgi since the Django docs > > explicitly support it. But, given my problems perhaps I'll try > > mod_wsgi next. > > That there is nothing in Django documentation about mod_wsgi is more > to do with no one offering up anything to add which mentions it. The > Django documentation on mod_wsgi site is reasonably comprehensive and > maybe even a link to that would be a good start. I haven't offered > anything up myself for the Django site as believe that it has to be > the Django developers/community that first need to work out whether > they see it as a viable option and when they are happy add a link to > it. > > FWIW, people are using mod_wsgi quite happily with Django. I know of a > couple of notable Django sites which are delaying looking at moving > until mod_wsgi 2.0 is released as that will be the first version which > allows Python code to be used to implement Apache HTTP authentication > provider. For what those sites do, having that feature is critical and > they can't move away from mod_python until mod_wsgi provides an > equivalent mechanism. > > Graham > > > On Dec 5, 8:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > wrote: > > > > On Dec 6, 12:04 pm, TP <[EMAIL PROTECTED]> wrote: > > > > > I've been using Django for the past few months and had great results > > > > with Apache and mod_python. However, I'd like to try and reduce the > > > > amount of memory that is used by having multiple Apache's each with > > > > their own copy of my application. I decided to try mod_fastcgi in > > > > Apache and Django's FastCGI server capability. > > > > Why have multiple Apache's if using mod_fastcgi. You should be able to > > > hang multiple FASTCGI hosted applications hanging off the one Apache. > > > > BTW, you might also want to look at mod_wsgi. Allows you to run Django > > > in separate process of their own just like FASTCGI, but everything > > > still managed by Apache without the need for you to separately start > > > Django or use any supervisor system to keep it running. > > > > Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Strange FastCGI problems
On Dec 6, 12:40 pm, TP <[EMAIL PROTECTED]> wrote: > I thought I needed multiple Apache's since I frequently have several > concurrent requests. The actual dynamic python processing is quick, > but since clients could be connected for relatively long (slow > connections, etc), I thought I'd need multiple Apache's talking to > each. Since Django says it's not officially thread safe, I'm using the > prefork MPM in Apache. Even in 'prefork' mode of Apache, there are multiple processes handling requests and so concurrent requests is not a problem. The problem with prefork though is that you can end up with lots of process, all consuming the maximum your Django application will use. For memory constrained VPS systems, using 'worker' MPM is a better choice as you cut down on the number of Apache child processes and therefore memory, with concurrency then coming from multithreading, but also from fact that multiple processes still may also be running. You might have a read of: http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading which talks about the different process/threading models that Apache provides and how mod_wsgi makes use of them and extends on them. In respective of thread safety of Django, where does it say it is 'not officially thread safe'. I know that it is implied through fact they suggest prefork when using mod_python, but they also don't say to avoid mod_python on Windows, which is multithread, plus FASTCGI examples give examples using multithreading. So, there is actually conflicting information on the issue. As explained in: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango the situation seems to be that there are no known current issues with Django itself in respect of multithreading. Thus, any multithread problems are more likely to come from the application built by a user using Django. So, it is just a matter of testing your application so you are satisfied that there isn't a problem. > I looked at mod_wsgi and decided to try fastcgi since the Django docs > explicitly support it. But, given my problems perhaps I'll try > mod_wsgi next. That there is nothing in Django documentation about mod_wsgi is more to do with no one offering up anything to add which mentions it. The Django documentation on mod_wsgi site is reasonably comprehensive and maybe even a link to that would be a good start. I haven't offered anything up myself for the Django site as believe that it has to be the Django developers/community that first need to work out whether they see it as a viable option and when they are happy add a link to it. FWIW, people are using mod_wsgi quite happily with Django. I know of a couple of notable Django sites which are delaying looking at moving until mod_wsgi 2.0 is released as that will be the first version which allows Python code to be used to implement Apache HTTP authentication provider. For what those sites do, having that feature is critical and they can't move away from mod_python until mod_wsgi provides an equivalent mechanism. Graham > On Dec 5, 8:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > On Dec 6, 12:04 pm, TP <[EMAIL PROTECTED]> wrote: > > > > I've been using Django for the past few months and had great results > > > with Apache and mod_python. However, I'd like to try and reduce the > > > amount of memory that is used by having multiple Apache's each with > > > their own copy of my application. I decided to try mod_fastcgi in > > > Apache and Django's FastCGI server capability. > > > Why have multiple Apache's if using mod_fastcgi. You should be able to > > hang multiple FASTCGI hosted applications hanging off the one Apache. > > > BTW, you might also want to look at mod_wsgi. Allows you to run Django > > in separate process of their own just like FASTCGI, but everything > > still managed by Apache without the need for you to separately start > > Django or use any supervisor system to keep it running. > > > Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Strange FastCGI problems
I thought I needed multiple Apache's since I frequently have several concurrent requests. The actual dynamic python processing is quick, but since clients could be connected for relatively long (slow connections, etc), I thought I'd need multiple Apache's talking to each. Since Django says it's not officially thread safe, I'm using the prefork MPM in Apache. I looked at mod_wsgi and decided to try fastcgi since the Django docs explicitly support it. But, given my problems perhaps I'll try mod_wsgi next. On Dec 5, 8:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Dec 6, 12:04 pm, TP <[EMAIL PROTECTED]> wrote: > > > I've been using Django for the past few months and had great results > > with Apache and mod_python. However, I'd like to try and reduce the > > amount of memory that is used by having multiple Apache's each with > > their own copy of my application. I decided to try mod_fastcgi in > > Apache and Django's FastCGI server capability. > > Why have multiple Apache's if using mod_fastcgi. You should be able to > hang multiple FASTCGI hosted applications hanging off the one Apache. > > BTW, you might also want to look at mod_wsgi. Allows you to run Django > in separate process of their own just like FASTCGI, but everything > still managed by Apache without the need for you to separately start > Django or use any supervisor system to keep it running. > > Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Strange FastCGI problems
On Dec 6, 12:04 pm, TP <[EMAIL PROTECTED]> wrote: > I've been using Django for the past few months and had great results > with Apache and mod_python. However, I'd like to try and reduce the > amount of memory that is used by having multiple Apache's each with > their own copy of my application. I decided to try mod_fastcgi in > Apache and Django's FastCGI server capability. Why have multiple Apache's if using mod_fastcgi. You should be able to hang multiple FASTCGI hosted applications hanging off the one Apache. BTW, you might also want to look at mod_wsgi. Allows you to run Django in separate process of their own just like FASTCGI, but everything still managed by Apache without the need for you to separately start Django or use any supervisor system to keep it running. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Strange FastCGI problems
I've been using Django for the past few months and had great results with Apache and mod_python. However, I'd like to try and reduce the amount of memory that is used by having multiple Apache's each with their own copy of my application. I decided to try mod_fastcgi in Apache and Django's FastCGI server capability. While running with FastCGI, every now and then I get a random exception 'RegexURLResolver' object has no attribute 'get_and_delete_messages'. In months of running my application with mod_python I've never seen this. I have another web app running under mod_python and it works fine every time with FastCGI. I'm using Apache 2.2.3, Centos, python 2.4.3, Django from SVN from about early October 2007, flup 1.0, and mod_fastcgi 2.4.6. Can anyone offer any pointers into what might be going wrong? Thanks! Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
On Dec 6, 3:18 am, "Uros Trebec" <[EMAIL PROTECTED]> wrote: I am sorry to report that this method does NOT work on my machine/account. I've tried different users (on the same machine) and it does not work. Symptoms are the same. Hey, I've run into next-level 500 Internal Server Error problems on Dreamhost. This time they seemed to be triggered by switch from kernel 2.4 to 2.6. I have finally figured out that Python can't start a new thread: Traceback (most recent call last): File "/home/myusername/mydomain.com/python_test.fcgi", line 17, in ? WSGIServer(test_app).run() File "/home/myusername/fcgi.py", line 1101, in run thread.start_new_thread(conn.run, ()) thread.error: can't start new thread My solution was the same as Grimboy's: switch threaded mode to prefork mode: http://grimboy.co.uk/blawg/django-on-dreamhost-problem/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Re: Django + FastCGI Problems
I am sorry to report that this method does NOT work on my machine/account. I've tried different users (on the same machine) and it does not work. Symptoms are the same. I guess it's just my machine the one that is F00! And they refuse to move my account to another one. :( Anyone knows about any concrete alternative hosting that is production stable for Django and offers reasonable prices (sub $10/month), disk space (5-10GB) and bandwidth (250GB+) with multiple domain/site hosting? (I tried site5.com, but they would not accept my Visa Electron or PayPal payment :( ) Best regards, Uros On 12/1/06, Maciej Bliziński <[EMAIL PROTECTED]> wrote: > > Mike, > > I was experiencing the same problems: incomplete headers and timeouts. > I did a simple trick that made my Django application run smoothly. > Perhaps you can try the same thing (it requires simple changes). I > described it on my blog: > > http://automatthias.wordpress.com/2006/12/01/django-on-dreamhost-incomplete-headers/ > > I haven't thoroughly verified it, it's an ongoing investigation. Maybe > you could try the same thing. I'd like to know if it works for other > people as well. > > Cheers, > Maciej > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
Mike, I was experiencing the same problems: incomplete headers and timeouts. I did a simple trick that made my Django application run smoothly. Perhaps you can try the same thing (it requires simple changes). I described it on my blog: http://automatthias.wordpress.com/2006/12/01/django-on-dreamhost-incomplete-headers/ I haven't thoroughly verified it, it's an ongoing investigation. Maybe you could try the same thing. I'd like to know if it works for other people as well. Cheers, Maciej --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
Uros Trebec wrote: > On Nov 27, 6:55 pm, "Uros Trebec" <[EMAIL PROTECTED]> wrote: > >> ATM, if I go to "http://localhost:8484/django.fcgi; I only get "403 >> Forbidden" response. > > OK, nevermind... I had to run "django-fcgi.py" too. > http://manuals.textdrive.com/read/book/15 > >> Now, how do I get Apache to redirect all requests to my lighttpd server? > > On the other hand, this seams to be impossible without mod_proxy. Or is > it? imho it's not possible without mod_proxy. and btw, regarding long-running stuff, check this: http://blog.dreamhosters.com/kbase/index.cgi?area=3079 gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
On Nov 27, 6:55 pm, "Uros Trebec" <[EMAIL PROTECTED]> wrote: > ATM, if I go to "http://localhost:8484/django.fcgi; I only get "403 > Forbidden" response. OK, nevermind... I had to run "django-fcgi.py" too. http://manuals.textdrive.com/read/book/15 > Now, how do I get Apache to redirect all requests to my lighttpd server? On the other hand, this seams to be impossible without mod_proxy. Or is it? Best regards, Uros --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Re: Django + FastCGI Problems
On 11/27/06, Gábor Farkas <[EMAIL PROTECTED]> wrote: > >> If anyone has questions about how to do this let me know. > > > > > > I for one, would VERY MUCH like to know how to do that. > > > > My django app has a downtime of 2 weeks now, because of the "incomplete > > headers" :( > > and btw. are you sure that Dreamhost allows running long-running > processes like lighttpd? Lets hope so! :) OK, I've built lighttpd and got it running with the basic configuration + the lines from http://www.djangoproject.com/documentation/fastcgi/#lighttpd-setup Now, how do I get Apache to redirect all requests to my lighttpd server? ATM, if I go to "http://localhost:8484/django.fcgi; I only get "403 Forbidden" response. Any suggestions? Best regards, Uros PS: This is my lighttpd.conf (with sensitive data omitted): server.document-root = "/home/username/mydomain/" fastcgi.server = ( "/django.fcgi" => ( "main" => ( "socket" => "/home/hostname/my.sock", "check-local" => "disable", ) ), ) alias.url = ( "/amedia/" => "/home/username/django/django_src/django/contrib/admin/media/", "/media/" => "/home/username/mydomain/media/", ) url.rewrite-once = ( "^(/amedia.*)$" => "$1", "^/favicon\.ico$" => "/media/favico.ico", "^(/.*)" => "/django.fcgi$1", ) server.port = 8484 server.username = "username" server.groupname = "group" mimetype.assign = ( ".html" => "text/html", ".txt" => "text/plain", ".jpg" => "image/jpeg", ".png" => "image/png" ) static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" ) dir-listing.activate = "enable" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
I think I have a solution. It's not great but it will have to do while I stay with Dreamhost (or until Dreamhost has formal Django support). Apache answers the requests, passes them on to lighttpd running on a different port which then talks to fcgi. This gives me full control over the whole web server. I can kill it if I need to etc. Apache never talks to fcgi. If anyone has questions about how to do this let me know. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
On 19 Nov 2006, at 05:35, coulix wrote: > mikeb i have the same problem it takes few minutes to come back and i > see a lot of python process waiting for whatever. > kill kill all ect have no effects. > But once it runs its all good. I have never found that the "touching" thing ever worked, but have found that if I kill the main python process (the one with the lowest pid usually) that the rest fall over and I then run django-fcgi.py again with minimal downtime... I know this is not best practice but I watch the access log until there's "just me and the bots" and do it then... :-) tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
mikeb i have the same problem it takes few minutes to come back and i see a lot of python process waiting for whatever. kill kill all ect have no effects. But once it runs its all good. mikeb wrote: > I just did that. Thanks for the pointer :) > > On Nov 18, 6:08 pm, "chasfs" <[EMAIL PROTECTED]> wrote: > > Hi Mike, > > Sorry I can't help you directly. Have you voted for Dreamhost > > feature: > > > > 2005-07-25 New FeaturesAdd support for Django (a python > > web-development framework). > > > > You vote onhttp://panel.dreamhost.com, click on Home and then > > Suggestions and then scroll down or search for Django. > > > > Good luck, > > -chasfshttp://chasfs.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
I just did that. Thanks for the pointer :) On Nov 18, 6:08 pm, "chasfs" <[EMAIL PROTECTED]> wrote: > Hi Mike, > Sorry I can't help you directly. Have you voted for Dreamhost > feature: > > 2005-07-25 New FeaturesAdd support for Django (a python > web-development framework). > > You vote onhttp://panel.dreamhost.com, click on Home and then > Suggestions and then scroll down or search for Django. > > Good luck, > -chasfshttp://chasfs.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + FastCGI Problems
Hi Mike, Sorry I can't help you directly. Have you voted for Dreamhost feature: 2005-07-25 New FeaturesAdd support for Django (a python web-development framework). You vote on http://panel.dreamhost.com, click on Home and then Suggestions and then scroll down or search for Django. Good luck, -chasfs http://chasfs.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Django + FastCGI Problems
I'm on dreamhost, which provides FastCgi but not mod_python. FastCGI has always been flaky there, where when I touch my django.fcgi file django sometimes takes a few minutes to come back. kill, killall, kill -9, kill -USR1 etc doesn't help. Lately it has gotten much worse. Whenever I touch any of the files, FastCGI panics and the site stops responding. Eventually the offending processes die but it causes a lot of downtime. The logs have entries such as these: [Sat Nov 18 07:48:32 2006] [error] [client 74.6.73.48] FastCGI: incomplete headers (0 bytes) received from server [Sat Nov 18 06:58:23 2006] [error] [client 74.6.72.117] (104)Connection reset by peer: FastCGI: comm with server Does anyone have any suggestions on what I can do w/o having root access and access to the Apache .conf files? Is there something else I can run instead of FastCGI? I've been scouring the net and this seems like a very common problem (for example: http://www.oreillynet.com/onlamp/blog/2006/01/python_web_application_deploym.html) but no one has a clean solution. I'd use mod_python if I could! thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Shared hosting - FastCGI problems
Sorry for the double post, this message didn't show up for 12 hours or so. Please continue here: http://groups.google.com/group/django-users/browse_frm/thread/ca36e7f1ce71c577/93ec9ceebf4bbd5e#93ec9ceebf4bbd5e --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---