4

I try this stack: nginx + uwsgi + django + postgresql, the request can reach to views of django, client show 500 server internal fault, I check postgres log, found the error could not receive data from client: Connection reset by peer. How to debug this?

1 Answer 1

1

I found the cause, in my uwsgi configuration file, I set thread = 2, after changing this to master = true and processes = 4, it works well now.

Well, how to debug this? I google the error, which tells me this is not postgresql fault, client application dropped the connection to database, on this stack: nignx <-> uwsgi <-> django <-> postgresql, so maybe the cause hide in nginx, uwsgi or djagno, I check nginx log and uwsgi log, there are no error logged. My friend suggest me that use pycharm to debug django remotely, I did debug django in deployment server, django was ok. Then I check configuration of uwsgi, found a novice's fault...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .