Finding Internal Server Errors

134 views
Skip to first unread message

David Wahlund

unread,
Jan 16, 2014, 10:01:02 AM1/16/14
to klaus...@googlegroups.com
FIRST!!!!

Hi
I'm getting a 500 error and I can't figure out how to catch it. I'm using uwsgi on nginx on FreeBSD. I can get the app to run and I can view the first page. But when I enter a repo I get an error. I'm using a startup rc-script and it might have something to do with permissions or paths. When I run uwsgi standalone it works fine.

For this and other possible future reasons I thought it might be a good idea to log errors. Now I've tried adding catch-exceptions to the uwsgi-conf, no change.

So I'm guessing the probably has something to do with something outside of klaus. Can I expect any output from 'catch-exception'? Is there any additional logging functions inside Klaus somewhere that I can use? Is it possible to enable debugging through uwsgi somehow?

Regards
David

This is my output:
*** Starting uWSGI 1.9.21.1 (32bit) on [Thu Jan 16 15:50:56 2014] ***
compiled with version: 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502) on 14 January 2014 23:45:30
os: FreeBSD-10.0-RC3 FreeBSD 10.0-RC3 #0 r259778: Tue Dec 24 04:35:46 UTC 2013     ro...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC
nodename: xxxxxxxxxxxxxxxx
machine: i386
clock source: unix
detected number of CPU cores: 1
current working directory: /
writing pidfile to /var/run/uwsgi-klaus.pid
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 5547
your memory page size is 4096 bytes
detected max file descriptor number: 58266
lock engine: POSIX semaphores
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/uwsgi-klaus.sock fd 3
uwsgi socket 1 bound to UNIX address /usr/local/www/klaus/klaus.sock fd 4
uWSGI running as root, you can use --uid/--gid/--chroot options
setgid() to 80
set additional group 1004 (git)
setuid() to 80
Python version: 2.7.6 (default, Dec 28 2013, 23:47:11)  [GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x28c44040
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 255792 bytes (249 KB) for 3 cores
*** Operational MODE: preforking ***
added /usr/local/lib/python2.7/site-packages/ to pythonpath.
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x28c44040 pid: 98537 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 98537)
spawned uWSGI worker 1 (pid: 98542, cores: 1)
spawned uWSGI worker 2 (pid: 98543, cores: 1)
spawned uWSGI worker 3 (pid: 98544, cores: 1)
[pid: 98542|app: 0|req: 1/1] 195.198.171.84 () {44 vars in 820 bytes} [Thu Jan 16 15:50:59 2014] GET /test/ => generated 291 bytes in 60 msecs (HTTP/1.1 500) 2 headers in 84 bytes (1 switches on core 0)

Jonas H.

unread,
Jan 16, 2014, 11:35:45 AM1/16/14
to klaus...@googlegroups.com
Welcome :)

Without the --catch-exceptions option, uwsgi should just log to stdout/stderr and there should be some way to look at these logs in your OS. Or you could just modify the rc script for the time being and pipe the output to some file.

I wonder why the --catch-exceptions thing doesn’t work for you though.


Reply all
Reply to author
Forward
0 new messages