10060: A connection attempt failed


  • | 462 points

    Hello,

    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.

    I receive 504 Gateway Time-out in the browser and looking at error.log it 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 :frowning2:

    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.


  • administrators
    | 62340 points

    @SaeedPrez :
    You can try increase the number of PHP Upstream Processes.
    Here's how:

    1. Open user\laragon.ini (Menu > Laragon > Settings file: laragon.ini)
    2. Put Upstream=X under [nginx] section
    [nginx]
    Upstream=5
    

    Laragon will auto manage 5 PHP processes to handle requests.
    Hope it help.


  • | 462 points

    Thank you @leokhoa, I will try it today and get back with the results.


  • | 462 points

    @leokhoa

    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.


  • administrators
    | 62340 points

    Strange. You may try to switch to a PHP Non Thread Safe version:
    Reference:
    https://forum.laragon.org/topic/166/tutorial-how-to-add-another-php-version


  • | 462 points

    @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=10 and see if that helps.


  • administrators
    | 62340 points

    @SaeedPrez: That's the cause. I hope increase Upstream to enough number can help.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.