E
E
ecspertiza2017-07-19 22:18:56
Django
ecspertiza, 2017-07-19 22:18:56

Nginx, error 502 when switching from Yandex?

Having found several requests for my site in Yandex, I discovered with a smile that after clicking on the links I get a 502 error. Through trial and error, I found that the referrer header is to blame. I can clarify the title if necessary, but there is a rather long line from Yandex
nginx generates the following error
recv() failed (104: Connection reset by peer) while reading response header from upstream
Different pages of the site generate this error, but not all. At first I thought that the problems were in the backend. But if I give the simplest answer "ok", I still get the same error, moreover, if I run the project on the Django server (python manage.py runserver 0.0.0.0:9090). There are no errors.
Everything works with this
Django 1.8.5
uwsgi
nginx environment
There is nothing more useful in the nginx logs. The uwsgi logs are generally empty. How can this error be debugged? Might give you an idea of ​​what it might be.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2017-07-19
@ecspertiza

In the uWSGI settings file or in the startup parameters, you must specify the buffer-size parameter with a value of 32768 and in the nginx settings define the uwsgi_buffers 8 128k.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question