Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am i getting error: recv() failed (104: Connection reset by peer) while reading response header from upstream during ajax request

I had problem with ajax. It always stopped working 5 min after request. I did't know what was causing it. I looked on many pages to find a sollution but nor provide good one. What I can do ?

like image 782
Dominik Avatar asked Nov 04 '16 15:11

Dominik


1 Answers

You need to check what you have set in /etc/php5/fpm/pool.d/www.conf file in line request_terminate_timeout. I has got:

request_terminate_timeout = 300s

This is because it had always stopped working after 5 min (300s = 5min)

After i changed it to request_terminate_timeout = 3600s my problem have gone. I have got now 60 min to complete my ajax request :)

PS Make sure that you remove ; before that line because it is used to comment line.

like image 195
Dominik Avatar answered Oct 30 '22 12:10

Dominik