Hey so for quite some time I have been having issues on my website
We have a feature where you can import data from another website and this function usually takes some time the first time you run it, upwards to 3-4 minutes due to all the data coming in and the calculations needed to be made to correctly display it all.
But the problem is that when someone imports and their trade log (the data we read in) is really big, in the middle of it, maybe 60-75 seconds in it returns a 502 bad gateway.
Now I’m not sure how to fix this, I am running Laravel Forge and Laravel as the framework obviously.
In both PHP CLI and PHP FPM I set max_input_time = 3600 max_execution_time = 3600 ignore_user_abort = On
But neither of that fixed it. So I went to NGINX and set a bunch of variables to super high numbers but nothing fixed that either.
What can I do?
Here is what my nginx error log says: 2017/08/18 11:29:37 [error] 5104#5104: *552840 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 162.158.134.181, server: altpocket.io, request: “GET /test1231 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.1-fpm.sock:”, host: “altpocket.io”
Here is PHP 7.1 FPM Log: [18-Aug-2017 11:29:37] WARNING: [pool www] child 1326, script ‘/home/forge/Altpocket.io/public/index.php’ (request: “GET /index.php”) execution timed out (78.546796 sec), terminating
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Were you able to resolve this problem? I am having the same issue. Using Laravel Forge (nginx PHP7) and getting the same error on long running scripts. I haven’t been able to find a solution.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.