Problem running pyramid 1.4 project with nginx+uwsgi

182 views
Skip to first unread message

Mazzaroth M.

unread,
Apr 20, 2013, 5:46:47 PM4/20/13
to pylons-discuss
Hi, I get "Internal Server Error" running a pyramid sqlalchemy scaffold app inside a virtualenv when I try to run it with uwsgi. However, when I run it with pserve, I get no issues and the orange pyramid hello world displays OK in Safari.

I'm using nginx 1.2.8, uWSGI 1.9.6, pyramid 1.4.


Here are my nginx settings:

Pyramid app settings:

in /private/etc/nginx/sites-available/test1:

server {
    listen          8080;
    access_log      off;
    error_log       /var/log/nginx/http.error.log;

    charset         utf-8;
    location / {
        uwsgi_pass  unix:///tmp/uwsgi.sock;
        include     uwsgi_params;
    }
}

> ln -sf /etc/nginx/sites-available/demo /etc/nginx/sites-enabled/demo

<restart nginx>


~~ uwsgi

> cd ~/webapps/env1/test1

> uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini

> ps aux | grep uwsgi

michael        24134   0.0  0.1  2446036   2608   ??  S     3:15pm   0:00.01 uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini
michael        24133   0.0  0.1  2446036   2608   ??  S     3:15pm   0:00.01 uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini
michael        24132   0.0  0.1  2446952   4396   ??  S     3:15pm   0:00.03 uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini
michael        24139   0.0  0.0  2432768    452 s002  R+    3:15pm   0:00.00 grep uwsgi
michael        24137   0.0  0.0  2446952    340   ??  S     3:15pm   0:00.00 uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini
michael        24136   0.0  0.1  2446036   2608   ??  S     3:15pm   0:00.01 uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini
michael        24135   0.0  0.1  2446036   2604   ??  S     3:15pm   0:00.01 uwsgi -H /Users/michael/webapps/env1 --http :8080 --ini development.ini


However, when I go to localhost:8080, I get "Internal Server Error"

Much of what I've done so far is based on this tut:


Any help would be greatly appreciated..

Michael


Wyatt Baldwin

unread,
Apr 21, 2013, 10:32:56 PM4/21/13
to pylons-...@googlegroups.com
What do your uwsgi logs show?

Wyatt Baldwin

unread,
Apr 21, 2013, 10:34:23 PM4/21/13
to pylons-...@googlegroups.com
Also, you probably don't want the --http option when using uwgi_pass w/ a socket.


On Saturday, April 20, 2013 2:46:47 PM UTC-7, Michael wrote:

Cornelius Kölbel

unread,
Apr 22, 2013, 2:06:09 AM4/22/13
to pylons-...@googlegroups.com

Hi Michael,
In case of an internal server error you should take a look at your web servers error log.

Kind regards
Cornelius 
--


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

askel

unread,
Jul 11, 2013, 5:10:25 PM7/11/13
to pylons-...@googlegroups.com
Michael,

It seems to me that while Nginx is configured to connect to uwsgi via socket file /tmp/uwsgi.sock you make uwsgi bind/listen to TCP port 8080.

- Alex
Reply all
Reply to author
Forward
0 new messages