Help debugging 500 error on some json responses - nginx
The error from nginx access log (not very helpful):
[redacted IP] - - [23/May/2013:16:40:40 +0000] "POST /nextitems/VLPCQVAMGV/21/21/ HTTP/1.1" 500 2006 "http://[redacted domain].com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31"
For one of the items that works fine on my laptop, but fails on the server, the log from the django runserver is:
[23/May/2013 04:01:12] "POST /nextitems/U48ST0SB84/36/36/ HTTP/1.1" 200 25216
That size (25216 bytes) is relatively large for the json I'm trying to pass, which is why I think it fails on the server. I also have another method to pass the same item as html, which works on the server (indicating it's not a database problem, and seems to be specific to passing json).
I also looked at the uwsgi log and I see (for a different nextitems call that caused a 500):
[pid: 3390|app: 0|req: 461/918] [redacted IP] () {50 vars in 916 bytes} [Thu May 23 12:35:58 2013] POST /nextitems/VX5VEQEA6G/21/21/ => generated 1994 bytes in 37 msecs (HTTP/1.1 500) 3 headers in 121 bytes (1 switches on core 0)
which looks OK, but chrome shows me:
POST http://[redacted IP].com/nextitems/VX5VEQEA6G/21/21/ 500 (INTERNAL SERVER ERROR)
Any ideas on how to fix this or how to further debug it? Thanks in advance!
8 Replies
Here is the ref
Are you aware of a setting in nginx or elsewhere that would help send large json responses from the server?
You might also want to consider Sentry
Thanks!