WebFaction
Community site: login faq
3
4

Hi there

I'm using a normal python wsgi application (MoinMoin Wiki) and running at the moment mod_wsgi. For an optimizing and better memory usage... I was stumbled over the uWSGI (WSGI Server / http://projects.unbit.it/uwsgi/wiki) and I discovered that with this I even can limit the amount of used memory (http://projects.unbit.it/uwsgi/wiki/Doc / --limit-as) and have many more options (compared to mod_wsgi). In general this wsgi server seems to use less memory and is even a bit faster then apache2 with mod_wsgi (http://nichol.as/benchmark-of-python-web-servers).

So I'm now wondering if anybody has experience to using uWSGI with webfaction on a shared hosting environment?

I think I will give them a try, looks very interesting and killin' the good old apache is anyway a tasty idea :-) maybe not clearly notify; to run it, you need some http server before... so I would need to go with nginx...

bye Marcel

asked 25 Oct '10, 10:37

marcel
671616
accept rate: 0%

edited 25 Oct '10, 16:48


A step-by-step install guide is now available here:

http://community.webfaction.com/questions/10242/installing-nginx-uwsgi

permanent link

answered 04 Nov '10, 03:44

klynton
1.6k129
accept rate: 42%

edited 19 Aug '12, 03:19

ryans ♦♦
5.0k83159

I've been experimenting with cherokee and uWSGI in development. Has anyone made any comparisons between nginx and cherokee performance with uWSGI on WebFaction servers? I'm curious if there's any notable difference in memory usage or performance, using the same python application (web2py for example). Of course, it would be best if WebFaction would allow use of nginx's native uWSGI connection feature, to avoid the need for any other web server instance or reverse-proxy step.

(02 Feb '11, 22:36) Jared H

Hi,

I've not made any comparisons myself and I don't think I've seen any on the web anywhere. We don't allow access to the frontend nginx since it controls all of the sites for every user on the machine so any misconfiguration would take out all sites, that's why we use the reverse-proxy setup.

(02 Feb '11, 22:46) klynton

thanks for providing the walkthrough. I have also had memory problems with Apache.

I found an error with the conf file at step 7. Needed to modify to this:

location / { uwsgi_pass 127.0.0.1:<port>; include uwsgi_params; }

and also manually create the tmp/nginx directory.

Also compile errors when building latest version of uwsgi at step 8. Seems using latest version is unstable so used an older version: http://projects.unbit.it/downloads/uwsgi-0.9.6.5.tar.gz

Now to figure out the wsgi.py part...

Richard

(10 Nov '11, 20:42) Baron

I wonder if there is ever a chance that webfaction would add django/uwsgi to the default list of apps installable through the control panel. I don't imagine it would be very hard for them to implement and would give us a very good option for easily setting up an environment.

(07 Mar '12, 15:51) joshcartme

joshcartme: Normally we do not add new installers unless there is a very high demand for one.

We have thought of adding an nginx/uwsgi installer in the past and did not because there was not enough demand.

I just put a request for second consideration in our internal tracking system and when we have a decision we will post here.

(07 Mar '12, 18:54) johns ♦♦

Thanks for the reply and throwing it into the internal tracking system! I would be quite excited.

(15 Mar '12, 12:33) joshcartme

+1 for a django/uwsgi or django/gunicorn installer

(10 Sep '12, 12:59) Michael Bunsen

Another +1 for this. See http://justcramer.com/2013/06/27/serving-python-web-applications/ for background

(28 Jun '13, 09:29) tclancy
showing 5 of 8 show 3 more comments

Starting from uWSGI 0.9.7 the embedded http server is production ready and does no more use threads but it is fully evented/async. Simply add --http 127.0.0.1:PORT_NUM to uwsgi commandline (and you can remove the -s/--socket option)

permanent link

answered 29 Mar '11, 05:55

unbit
111
accept rate: 0%

Just a note, for now i'm running my moinmoin wiki (python/wsgi) on webfaction with nginx and uwsgi. running uwsgi directly as server (--http) was not working, due some problems with wrong encoded utf-8 urls. anyway nginx (note: configure with only the basic modules, no need for flv stuff & co) and uwsgi (just installed with pip) works seamless and ultra fast :-) my configuration files are available here. In time permits I like to write a short howto.

thanks webfaction for your cool hosting environment. bye Marcel

permanent link

answered 07 Sep '11, 07:14

marcel
671616
accept rate: 0%

edited 07 Sep '11, 07:15

I'd love to see a howto if you get a chance.

(25 Jan '12, 13:46) Michael Bunsen

Marcel, really, plus one for a how-to on installing moinmoin as you have!

(21 May '13, 15:31) jjon
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×97
×86
×62
×26

question asked: 25 Oct '10, 10:37

question was seen: 24,693 times

last updated: 28 Jun '13, 09:29

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM