problems when inserting data from Excel to DB - nginx


I'm trying to upload the data from an excel document to a database. It works with less than 1200 rows, but with more it generates error 502 (Bad Gateway). The excel I'm trying to upload contains 30,000 rows.

This error appears in the server log:


2016/06/06 20:43:13 [error] 6569 # 0: * 113 recv () failed (104:   Connection reset by peer) while reading response header from upstream,   client:, server:, request: "POST / uploadExcel   HTTP / 1.1 ", upstream:" fastcgi: // unix: /var/run/php5-fpm.sock: ", host:   "", referrer: " link "

Is there a configuration that I have to do in NGINX or PHP to make it work?

This is the file www.conf

asked by Santiago Ruiz 07.06.2016 в 04:33

1 answer


Finally I found the answer. (LINUX)

In the /etc/php5/fpm/pool.d/www.conf file there is a line of code that says


request_terminate_timeout = 128

The only thing I did was change it to


request_terminate_timeout = 3000

Finally you have to restart the FPM and NGINX services.


sudo service php5-fpm restart


sudo service nginx restart

answered by 07.06.2016 / 07:10