Re: Django/uWSGI/nginx under load

2021-02-20 Thread Andy Robinson
I'm unsure what you mean - do you mean "are we executing raw SQL queries and a Python db api, or using Django's ORM?" If so, usually the latter but this is definitely not a problem of poorly written queries, we've profiled them. - Andy On Saturday, 20 February 2021 at 17:44:45 UTC jmccla...@

Re: Django/uWSGI/nginx under load

2021-02-20 Thread Andy Robinson
Thanks for this. 27k file descriptors out of about 370k allowed. I presume that means this isn't a problem? (We run a lot of different virtual hosts on this box, each with a few Django processes) - Andy On Saturday, 20 February 2021 at 16:15:12 UTC mob...@aldian.net wrote: > Check the number

Re: Django/uWSGI/nginx under load

2021-02-20 Thread John McClain
are you using django directly to run the queries or are you querying the db. I had a similar problem a while back with a project and the load was resolved by letting python do the work. On Sat, 20 Feb 2021 at 15:23, Andy Robinson wrote: > Hi all, > > We're maintaining an application that is hi

Re: Django/uWSGI/nginx under load

2021-02-20 Thread Aldian Fazrihady
Check the number of open file descriptor when you experienced the slow response. On Sat, Feb 20, 2021 at 10:23 PM Andy Robinson wrote: > Hi all, > > We're maintaining an application that is hitting scaling problems. It > helps run grass-roots sporting events all over Europe, so Saturdays can >

Django/uWSGI/nginx under load

2021-02-20 Thread Andy Robinson
Hi all, We're maintaining an application that is hitting scaling problems. It helps run grass-roots sporting events all over Europe, so Saturdays can produce large and unpredictable loads, with both logged-in users and public viewers. Despite a powerful server seemingly being lightly loaded (

Django, uwsgi, gevent, Pymongo

2016-03-24 Thread Web Architect
Hi, We have a live site running on Django and uwsgi. Pymongo is being used in the application for MonogoDB. uwsgi is being used to run the Django application. As per Pymongo docs, it has been suggested to use Gevent monkey patching: https://api.mongodb.org/python/current/examples/gevent.html

Re: Django & uWSGI best practices

2012-05-13 Thread chuwy
Yeah. But default Ubuntu's uwsgi init-script seems so pretty, featureful and complete, but without a word about emperor-mode, so I think this is not mainstream way of running applications. Anyway, many thanks. P.S. If you can give more "random" advices or links about deploying multiapp configura

Re: Django & uWSGI best practices

2012-05-11 Thread Roberto De Ioris
> Hi. > I'm going to deploy a few (8-12) Django projects on my VDS with Ubuntu > 12.04 and nginx. And I wonder how should configuration look like, to be > explicit, simple and easy-to-understand for others (it will be maintained > by another dude). > Should I use emperor-mode for such a small amou

Django & uWSGI best practices

2012-05-11 Thread chuwy
Hi. I'm going to deploy a few (8-12) Django projects on my VDS with Ubuntu 12.04 and nginx. And I wonder how should configuration look like, to be explicit, simple and easy-to-understand for others (it will be maintained by another dude). Should I use emperor-mode for such a small amount of site

Re: [help] Server Config: django + uwsgi + nginx

2012-05-03 Thread easypie
yes. i believe it's 'ln -s /etc/nginx/sites-available/mysite.com /etc/nginx/sites-enabled/mysite.com' On Thursday, May 3, 2012 2:40:35 PM UTC-7, Karl Sutt wrote: > > Have you symlinked /etc/nginx/sites-available/mysite.comto > /etc/nginx/sites-enabled/ > mysite.com ? > > Karl Sutt > > > On Thu,

Re: [help] Server Config: django + uwsgi + nginx

2012-05-03 Thread Karl Sutt
Have you symlinked /etc/nginx/sites-available/mysite.comto /etc/nginx/sites-enabled/ mysite.com ? Karl Sutt On Thu, May 3, 2012 at 10:23 PM, easypie wrote: > I'm not sure if I should post this in this thread of mine or start new > one. But it's still about the config files. > > After getting u

Re: [help] Server Config: django + uwsgi + nginx

2012-05-03 Thread easypie
I'm not sure if I should post this in this thread of mine or start new one. But it's still about the config files. After getting uwsgi to work. I tried to link nginx w/ it but that didn't work. I go to localhost:80 and that takes me to the welcome page: "Welcome to Nginx!". When I go to localho

Re: [help] Server Config: django + uwsgi + nginx

2012-05-03 Thread Kurtis Mullins
Hey, I'm glad to hear you got it working! If you run into any more problems, don't hesitate to ask. On Wed, May 2, 2012 at 1:31 AM, easypie wrote: > Thanks. I was missing the virtualenv= mentions earlier. I'm glad I > know this those settings are meant for development only. I was a little > conf

Re: [help] Server Config: django + uwsgi + nginx

2012-05-01 Thread easypie
Thanks. I was missing the virtualenv= mentions earlier. I'm glad I know this those settings are meant for development only. I was a little confused thinking that was ready for deployment. I'm new to all this and get confuse sometimes. On Tuesday, May 1, 2012 8:04:00 AM UTC-7, Kurtis wrote: > >

Re: [help] Server Config: django + uwsgi + nginx

2012-05-01 Thread easypie
how would i start that? sudo uwsgi start sudo service nginx start? On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: > > Here is my uWSGI command and nginx.conf contents: > > uwsgi -- http://www.dpaste.org/aiJuq/ > nginx -- http://www.dpaste.org/bAG0o/ > > I've used it for a Flask appl

Re: [help] Server Config: django + uwsgi + nginx

2012-05-01 Thread Kurtis Mullins
Judging from your Import Error -- I think you're having a problem with Django not being on the Python path. In my uwsgi configuration file (I used .xml), it looks like this: DJANGO_SETTINGS_MODULE=fireflie.settings 4 0.0.0.0:7999 /home/fireflie/staging/fireflie/ django.co

Re: [help] Server Config: django + uwsgi + nginx

2012-04-30 Thread Karl Sutt
I am not entirely sure what you mean by that. If you mean the nginx equivalent of Apache VirtualHosts then the nginx wiki explains it quite nicely http://wiki.nginx.org/ServerBlockExample. Is that what you meant? Karl Sutt On Mon, Apr 30, 2012 at 7:04 PM, easypie wrote: > does your configurati

Re: [help] Server Config: django + uwsgi + nginx

2012-04-30 Thread easypie
does your configuration allow for running multiple sites? On Sunday, April 29, 2012 12:01:27 PM UTC-7, Karl Sutt wrote: > > Here is my uWSGI command and nginx.conf contents: > > uwsgi -- http://www.dpaste.org/aiJuq/ > nginx -- http://www.dpaste.org/bAG0o/ > > I've used it for a Flask application,

Re: [help] Server Config: django + uwsgi + nginx

2012-04-29 Thread Roberto De Ioris
> i followed the django-http+uwsgi quick start and ended up with an error. > ImportError: no module named django.core.handlers.wsgi \n unable to load > app ... > here's the error log: dpaste.org/BM5BW Are you sure you are not using a >=1.4 django version or a virtualenv ? If you are uging a virt

Re: [help] Server Config: django + uwsgi + nginx

2012-04-29 Thread easypie
i followed the django-http+uwsgi quick start and ended up with an error. ImportError: no module named django.core.handlers.wsgi \n unable to load app ... here's the error log: dpaste.org/BM5BW On Sunday, April 29, 2012 11:31:43 AM UTC-7, Roberto De Ioris wrote: > > > > I have this file that was

Re: [help] Server Config: django + uwsgi + nginx

2012-04-29 Thread Karl Sutt
Here is my uWSGI command and nginx.conf contents: uwsgi -- http://www.dpaste.org/aiJuq/ nginx -- http://www.dpaste.org/bAG0o/ I've used it for a Flask application, but I've just tested it and it works for a Django project as well. Note that wsgi.py file in the uwsgi command is the Python file tha

Re: [help] Server Config: django + uwsgi + nginx

2012-04-29 Thread Roberto De Ioris
> I have this file that was created for me by one of the users in django's > irc channel. I edited to have the right information inserted but I"m not > sure what I'm doing wrong to not make it work. I've spent some time trying > to understand each line by searching the web. There's still a thing o

[help] Server Config: django + uwsgi + nginx

2012-04-29 Thread easypie
I have this file that was created for me by one of the users in django's irc channel. I edited to have the right information inserted but I"m not sure what I'm doing wrong to not make it work. I've spent some time trying to understand each line by searching the web. There's still a thing or two

Re: can not download file from my site ( django + uwsgi )

2011-05-04 Thread Lei Zhang
Finally, I found the reason. It is the file privilege problem. The Nginx have no privilege about /uwsgi_tmp folder On Wed, Apr 13, 2011 at 3:25 PM, Roberto De Ioris wrote: > > Il giorno 12/apr/2011, alle ore 04.05, Lei Zhang ha scritto: > > > the static file is returned by nginx, and it is work

Re: django uwsgi

2011-04-30 Thread CrabbyPete
Thanks Shawn, That is exactly what it is. I could have added one path up. I just changed my ROOT_URLCONF = 'urls' instead of ROOT_URLCONF = 'project.urls' in my settings and it works fine. On Apr 30, 1:42 pm, Shawn Milochik wrote: > It sounds like your project directory is not on your PYTHONPATH,

Re: django uwsgi

2011-04-30 Thread Shawn Milochik
It sounds like your project directory is not on your PYTHONPATH, so when settings tries to import your default urls.py it fails. I'm not familiar with uwsgi, so maybe that's what the addsitedir is supposed to do, but other wsgi files I've seen there's always been a line like sys.path.append(pr

django uwsgi

2011-04-30 Thread CrabbyPete
I am trying to deploy a django project with nginx and uwsgi. I think I have it all set up right but when I hit the site I get the following error: No module named project.urls I know everything else is working because I still have debug on and can see that settings.py is being read. I know I'm fo

Re: can not download file from my site ( django + uwsgi )

2011-04-13 Thread Roberto De Ioris
Il giorno 12/apr/2011, alle ore 04.05, Lei Zhang ha scritto: > the static file is returned by nginx, and it is works well. > But the file returned by dynamic pages does't works very well. You have a pretty standard configuration. Check the uWSGI logs (they report the response size) to see wher

Re: can not download file from my site ( django + uwsgi )

2011-04-11 Thread Lei Zhang
the static file is returned by nginx, and it is works well. But the file returned by dynamic pages does't works very well. On Mon, Apr 11, 2011 at 7:23 PM, Roberto De Ioris wrote: > > > Hi all, > > > > If the site is started by './manager runserver', I can download file from > > the site success

Re: can not download file from my site ( django + uwsgi )

2011-04-11 Thread Roberto De Ioris
> Hi all, > > If the site is started by './manager runserver', I can download file from > the site successfully. But the strange is that I can not download file > from > it when it deployed using nginx and uwsgi. It just return part (25KB) of > the whole file(1MB). > does anyone know how to fix t

Re: can not download file from my site ( django + uwsgi )

2011-04-11 Thread Jeffrey4l
I am sorry for paste wrong code. here is the uwsgi_param config {{{ uwsgi_param QUERY_STRING $query_string; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; uwsgi_param CONTENT_LENGTH $content_length; uwsgi_param REQUEST_URI$requ

can not download file from my site ( django + uwsgi )

2011-04-11 Thread Jeffrey4l
Hi all, If the site is started by './manager runserver', I can download file from the site successfully. But the strange is that I can not download file from it when it deployed using nginx and uwsgi. It just return part (25KB) of the whole file(1MB). does anyone know how to fix this? here is