Ok, so how put django to work? I try early info.

#1
I have the most recent trunk of django. I read the info on this forum and of the wiki.

However, I keep getting

503 Service Unavailable

And this is the error:

2008-02-15 21:51:21.670 ERROR execle() failed with errno=13, when try to start Fast CGI application: /home/d9a402a6/jhonWeb/paradondevamos/django-fcgi.py!
2008-02-15 21:51:21.778 INFO Remove pid: 3503
2008-02-15 21:51:21.778 INFO Pid: 3503 associated with [Paradonde]
2008-02-15 21:51:21.778 INFO [Paradonde] pid list size: 0, pid stop list size: 0
2008-02-15 21:51:21.778 NOTICE [Paradonde] stop worker processes
2008-02-15 21:51:21.779 INFO [Paradonde] 1 request being processed, kill external app later.

My settings are:

Name Paradonde
Address uds://tmp/paradonde.sock
Notes Not Set
Max Connections 1
Environment Not Set
Initial Request Timeout (secs) 10
Retry Timeout (secs) 5
Persistent Connection No
Connection Keepalive Timeout 30
Response Buffering No
Auto Start Yes
Command /home/d9a402a6/jhonWeb/paradondevamos/django-fcgi.py
Back Log 50
Instances 1

django-fcgi.py:

import sys, os
from settings_dev import BASE_DIR
BASE_DIR = os.path.abspath(os.path.dirname(__file__)+'/../')
sys.path.append(BASE_DIR)

os.chdir(BASE_DIR)
# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "paradondevamos.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="prefork", daemonize="false")

Also, I don't can acces this useing the uri '/'. I have a new vhost for this... I must delete the default one?
 
#2
Also, I get suere the django-fcgy was set to 755 and the owner was www:www the same of the webserver.

This is running on Joyent accelerator
 

mistwang

LiteSpeed Staff
#3
error 13 is permission denied. so it is a permission problem.
Please check the permission of parent directories as well.

try

sudo -s <user_name> /home/d9a402a6/jhonWeb/paradondevamos/django-fcgi.py

make sure it can be started.

Double check the Memrory Soft/Hard Limit and Process Soft/Hard Limit.
 
#4
I have nothing in limits.

I'm on solaris, when I run this:

sudo -s www /home/d9a402a6/jhonWeb/paradondevamos/django-fcgi.py

I get:

www: No such file or directory

-s is not found.

I run chown -R www:www jhonWeb (jhonWeb is the parent directory) and using my sftp client see is set ok.

LiteSpeed is running under: user(www) : group(www)
 
Last edited:
#6
That not work

I find this command for solaris:

ls -l

and get for all files on my dir:

-rw-r--r-- 1 www www 408 Feb 15 21:48 django-fcgi.py

So I confirm all files are set to www.
 
#10
Almost there!

Ok, you put me in the right track.

I change to the harcode python path and work ok (I have python2.4/2.5 both installed, so that must be).

Also, I change the command, so is now:

/opt/local/bin/python2.4 /home/d9a402a6/jhonWeb/paradondevamos/manage.py runfcgi method=prefork

Then I got:

unpack non-sequence

And stop when acces

request.path

on django.

I then imagine is because I put this on contect /para/. I move it to '/' but get 404.

I need to setup rewrite for this?
 

mistwang

LiteSpeed Staff
#11
You should create a FastCGI context for each URL that should be handled by the framework.
Handler should be set to the python external app.

I think you should add "daemonize=false" parameter as well.
 
#12
No understand. I must map ALL the urls? Included the managed by django itself?

I have dozens of that! I'm thinking in use litespeed for a medium size community/social site.
 
T

triedia09

Guest
#14
Ok so how put django to work I try early info

That looks useful... but I dont understand any of this tbh... maybe you can put it in a webpage for me or something so I can use it?
 
Top