views:

132

answers:

2

I have successfully deployed a Django app with uWSGI + Cherokee. However, I want to experiment with Pylons before I go decide on Django.

So far I have followed the instructions/recommendations here: http://stackoverflow.com/questions/2217679/deploying-pylons-with-uwsgi

Paster serve works without a hitch. But when I try to serve via uWSGI, I get nowhere:

/usr/bin/uwsgi -s :5000 --paste config:/var/www/env/helloworld/development.ini -H /var/www/env -M

My uWSGI master and worker processes are spawned. SO, I visit http://localhost:5000 This is what I get:

Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

And my terminal reads back (and repeats when I refresh browser):

invalid request block size: 21573...skip

What am I doing wrong? I cannot find any guide or step-by-step specific for uWSGI + Cherokee

+4  A: 

You should not visit http://localhost:5000. 5000 it's the port use for the communication between Cherokee and uWSGI. So you're trying to access uWSGI directly. You need to configure Cherokee and then go to the address:port you have configured in Cherokee to see your website.

Docs:

Etienne
A: 

You should more importantly increase the buffer size. That is why you are getting an invalid request due to block size.

You can do this with the b option in uwsgi. Set it to something like 25000.

So your command line would look something like this :

/usr/bin/uwsgi -s :5000 --paste config:/var/www/env/helloworld/development.ini -H /var/www/env -b 25000 -M

And you should be alright ...

Ben Ahlan