Hi all,
I am now using uwsgi for my django application with cherokee.
but still have trouble making them work.
I have configured virtual host's interpreter as:
uwsgi -s 127.0.0.1:3009 -x /home/km/myproject/uwsgi.xml -w django_wsgi
--logto /var/log/cherokee.error -p 4 -M
my uwsgi.xml in django project dir contains:
###########################
<uwsgi>
<pythonpath>/usr/local/lib/python2.6/dist-packages/</pythonpath>
<pythonpath>/home/km/myproject/</pythonpath>
<app mountpoint="/">
<script>django_wsgi</script>
</app>
</uwsgi>
###########################
and my django_wsgi.py in django project dir contains:
#####################
import os
import django.core.handlers.wsgi
import uwsgi
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
application = django.core.handlers.wsgi.WSGIHandler()
uwsgi.applications = {'':application}
###########################
To debug, I have also tried testing the interpreter command in a terminal
and it shows:
#####################################3
uwsgi -s 127.0.0.1:3009 -x /home/km/myproject/uwsgi.xml -w django_wsgi -M
-p 4
[uWSGI] parsing config file /home/km/myproject/uwsgi.xml
*** Starting uWSGI 0.9.6.6 (32bit) on [Tue Jan 25 23:37:25 2011] ***
compiled with version: 4.4.5
Python version: 2.6.6 (r266:84292, Sep 15 2010, 16:02:57)
[GCC 4.4.5]
your memory page size is 4096 bytes
allocated 412 bytes (0 KB) for 1 request's buffer.
binding on TCP port: 3009
your server socket listen backlog is limited to 64 connections
added /usr/local/lib/python2.6/dist-packages/ to pythonpath.
added /home/km/myproject/ to pythonpath.
initializing hooks...done.
...getting the applications list from the 'django_wsgi' module...
application 0 () ready
setting default application to 0
invalid application (/). skip.
spawned uWSGI master process (pid: 1067)
spawned uWSGI worker 1 (pid: 1068)
spawned uWSGI worker 2 (pid: 1069)
spawned uWSGI worker 3 (pid: 1070)
spawned uWSGI worker 4 (pid: 1071)
#############################################
looks like it starts all well on commandline but does not get started from
the cherokee-admin interface at server restart.
what could be the problem ?
regards,
KM
On Mon, Jan 24, 2011 at 10:39 PM, zodman <[email protected]> wrote:
> the commun problem its cherokee cannot comunicate with the socket (
> tcp/unix) check if the config have the same socket. and runfcgi too.
>
> i use django with uwsgi and its excelent ...
>
> On Mon, Jan 24, 2011 at 10:57 AM, km <[email protected]> wrote:
> >
> >
> > On Mon, Jan 24, 2011 at 10:26 PM, km <[email protected]> wrote:
> >>
> >> Hi all,
> >>
> >> yes it uses flup
> >> the workers like this
> >> python /home/km/japan/manage.py runfcgi protocol=scgi host=127.0.0.1
> >> port=48433
> >
> > this should be
> >
> > python /home/km/myproject/manage.py runfcgi protocol=scgi host=127.0.0.1
> > port=484
> >
> >> I have enabled the virtualhost to log errors. but i dont see any errors
> in
> >> the logs (/var/log/cherokee.errors). its just empty.
> >> I am unable to know where actually the probem is
> >> pls let me know
> >>
> >> thanks
> >> regards,
> >> KM
> >>
> >> On Mon, Jan 24, 2011 at 10:15 PM, zodman <[email protected]> wrote:
> >>>
> >>> need more data what method are you using flup/uwsgi ?
> >>>
> >>> and cherokee error log what said
> >>>
> >>> On Mon, Jan 24, 2011 at 9:12 AM, km <[email protected]> wrote:
> >>> > Hi all,
> >>> >
> >>> > My django + cherokee config:
> >>> > python2.6 with flup and django 1.2.4
> >>> > cherokee 1.0.18 (statically compiled)
> >>> > django project root at /var/www/myproject
> >>> > app at /var/www/myproject/myapp
> >>> >
> >>> > I have created a virtual host in django-admin interface to serve
> >>> > myproject
> >>> > as a website.
> >>> > I have an "index" function in /var/www/myproject/myapp/views.py which
> >>> > would
> >>> > render /var/www/myproject/myapp/templates/base.html as index page.
> >>> > The corresponding,
> >>> > /var/www/myproject/urls.py contains mapping this way:
> >>> > urlpatterns = patterns('myapp.views',
> >>> > (r'^$','index'),
> >>> > )
> >>> > But I am unable to access myproject on the web interface using
> >>> > localhost/myproject or even using the virtualhost nickname.
> >>> > pls let me know
> >>> > thanks
> >>> > regards,
> >>> > KM
> >>> >
> >>> > _______________________________________________
> >>> > Cherokee mailing list
> >>> > [email protected]
> >>> > http://lists.octality.com/listinfo/cherokee
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Andres Vargas
> >>> www.zodman.com.mx
> >>
> >
> >
>
>
>
> --
> Andres Vargas
> www.zodman.com.mx
>
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee