[prev in list] [next in list] [prev in thread] [next in thread]
List: uwsgi
Subject: [uWSGI] Dynamic App chdir inconsistencies
From: roberto () unbit ! it (Roberto De Ioris)
Date: 2011-07-21 7:41:23
Message-ID: 9CF3F21B-68A4-43FB-BCE0-1919E1B071E2 () unbit ! it
[Download RAW message or body]
Il giorno 21/lug/2011, alle ore 09:37, Ryan Showalter ha scritto:
> Beautiful!
>
> Why does removing SCRIPT_NAME fix the issue?
The / SCRIPT_NAME is considered the default app, in your logs it looks like the \
system get confused by having two apps marked as default. This is a bug of uWSGI for \
sure, but probably i will not fix it (i will update the doc obviously) as this is a \
so 'delicate' part that i am sure to break something :)
>
> Thank you,
> Ryan-
>
>
>
> On Thu, Jul 21, 2011 at 12:02 AM, Roberto De Ioris <roberto at unbit.it> wrote:
> >
> > Il giorno 21/lug/2011, alle ore 08:24, Ryan Showalter ha scritto:
> >
> > > Hey everyone,
> > >
> > > I'm attempting to run some virtualenv apps with uwsgi using the vhost
> > > and no-site options, and I've got everything working great except for
> > > a small error. If I have 1 server_name of example.aaa.com and another
> > > of example2.aaa.com, the first time I load each one, everything works
> > > fine. However, when attempting to load them on subsequent requests,
> > > uwsgi becomes confused and will show the wrong virtualenv (it shows
> > > the example2 virtualenv when requesting example.aaa.com one out of
> > > every 5 times or so).
> > >
> > > Looking at the debug logs, it looks like the proper server_name is
> > > being detected, but for some reason the chdir is not always set
> > > correctly. The relevant information from the nginx config and my
> > > uwsgi config are below with the logs as well.
> > >
> > > I'm using uWSGI 0.9.8.2 compiled with Python 2.6 (and both virtualenvs
> > > are also running python 2.6) with debugging enabled.
> > >
> > > NGINX:
> > >
> > > /etc/nginx/sites-enabled/example.aaa.com:
> > >
> > > include uwsgi_params;
> > > uwsgi_param UWSGI_PYHOME /opt/webapps/example.aaa.com;
> > > uwsgi_param UWSGI_CHDIR /opt/webapps/example.aaa.com;
> > > uwsgi_param UWSGI_SCRIPT config.django_wsgi;
> > > uwsgi_param SCRIPT_NAME /;
> > > uwsgi_modifier1 30;
> > >
> > >
> > > /etc/nginx/sites-enabled/example2.aaa.com:
> > >
> > > include uwsgi_params;
> > > uwsgi_param UWSGI_PYHOME /opt/webapps/example2.aaa.com;
> > > uwsgi_param UWSGI_CHDIR /opt/webapps/example2.aaa.com;
> > > uwsgi_param UWSGI_SCRIPT config.django_wsgi;
> > > uwsgi_param SCRIPT_NAME /;
> > > uwsgi_modifier1 30;
> > >
> > > /etc/uwsgi/conf.yml
> > > uwsgi:
> > > master: true
> > > processes: 3
> > > memory-report: true
> > > harakiri: 30
> > > vacuum: true
> > > max-requests: 500
> > > reload-on-as: 256
> > > reload-on-rss: 128
> > > vhost: true
> > > no-site: true
> > > daemonize: /var/log/uwsgi.log
> > > socket: /tmp/uwsgi.sock
> > >
> >
> > Can you retry without specifying the SCRIPT_NAME in both config ?
> >
> > Thanks
> >
> > --
> > Roberto De Ioris
> > http://unbit.it
> >
> > _______________________________________________
> > uWSGI mailing list
> > uWSGI at lists.unbit.it
> > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
> >
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
--
Roberto De Ioris
http://unbit.it
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic