The error I am getting in the logs:
“upstream prematurely closed connection while reading response header
After the first request it works for 10-15 seconds without any problem.
According to tcpdump in the first request (the failing one) the upstream
receiving one GET and nothing more.
I found one workaround
which is adding the same upstream twice and adding the “backup”-option.
first request then fails but the second in all of my cases succeeds
via logs and tcpdump).
Any ideas (also some comments that could lead me to the solution would
Posted at Nginx Forum: