10060: A connection attempt failed
From time to time, usually it happens once or twice a day where my local websites stop loading and I have to reload Nginx in order for it to work again.
504 Gateway Time-outin the browser and looking at
error.logit shows the following error message:
2017/02/15 17:17:32 [error] 10740#9232: *4467 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: manager.dev, request: "GET /site/list/2/2/edit HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "manager.dev", referrer: "http://localhost:3000/site/list/2/2/edit"
I tried searching this forum and Google without much luck
My setup is:
- Windows 10
- Laragon Full 2.1.6
- Nginx 1.10.1
- PHP 7.1.1
- MariaDB 10.2.3
It's not a huge deal but if anyone has a solution, it's highly appreciated.
You can try increase the number of PHP Upstream Processes.
- Open user\laragon.ini (Menu > Laragon > Settings file: laragon.ini)
- Put Upstream=X under [nginx] section
Laragon will auto manage 5 PHP processes to handle requests.
Hope it help.
Thank you @leokhoa, I will try it today and get back with the results.
The problem still exists, just happened again. I should add that when it happens, I can not load any further pages until I reload the Nginx server.
Even other domains stop working, it just sits and thinks until it times out.
Strange. You may try to switch to a PHP Non Thread Safe version:
@leokhoa Tried PHP 7.1.2 Non Thread Safe but the problem persists. I'm not sure, but it might have something to do with BrowserSync and viewing the page simultaneously on multiple devices..
It just crashed again so I'm going to try with
Upsteam=10and see if that helps.
@SaeedPrez: That's the cause. I hope increase Upstream to enough number can help.