A website is not accessible with "Nginx 504 Gateway Time-out"

Follow

Comments

11 comments

  • Avatar
    iamkingsleyf

    now is 502 error, plesk have started again

  • Avatar
    Pavel Mikhaylov (Edited )

    Hello iamkingsleyf,

    Do you experience the issue with 502 error at the moment?

    If you do, please let us know, what are other symptoms of the issue? What is in the subscription log files?

    I would also like to recommend contacting our support: https://www.plesk.com/contact-support

  • Avatar
    iamkingsleyf

    Yes i do but 504 error all 21 domains

  • Avatar
    Bulat Tsydenov

    @iamkingsleyf, the assistance with this issue was provided to you in scope of support ticket. If you need further assistance, please reply to the ticket.

  • Avatar
    yoyoy

    hello

    if you experience problems after modifying nginx.conf add the line proxy_connect_timeout 1200s;

    it could be useful ;)

  • Avatar
    Ivan Postnikov

    @yoyoy, yes, this is mentioned in step 1 of resolution.

  • Avatar
    Glenn

    I would also suggest limiting search time period so you're not searching logs months or years old:

    grep -R "upstream timed out" /var/www/vhosts/*/logs/ | grep "2018/10/3*" | wc -l &

    For example. 

  • Avatar
    Ivan Postnikov

    Hello @Glenn,

    Thank you for the hint, this command modification may be useful for other Pleskians.

    However, the command in symptom does not require modification in accordance with the present date and is more universal.

  • Avatar
    Glenn

    Hi Ivan,

    When I ran the command without a date limit, the result was 12000+ and according to my tech, was parsing logs more than a year old. It's was an insanely high number.

    When we ran it with date limit I got a more reasonable and realistic number of approx. 1100 and adjusted fcgi to 1200s. 

    Thanks for feedback.

     

  • Avatar
    Jerome Nameche

    Hi Guys,

    I did the following on my Plesk. and it really helps me to make heavier request on my woocommerce webshop syncing several products with sub-webshops.

    Still, I have a big issue:

    Despite these lines of code in my php-settings. I can still get 504 get away error and when I have it. my server is then down for 5 long minutes ! I then try to load simply the homepage and it's white charging during 1 minutes and finally displaying the lovely 504.

    why the server is getting stuck like this?? how to avoid that?
    I don't see any peak of CPU or memory usage during these 5 minutes.

    How can I know what are the optimale timeout limits?! If I increase too much these values I also think server will crash.

    thx in advance !!

    I need help and knowledge here..please 

  • Avatar
    Alisa Kasyanova

    @Jerome Nameche

    Hi! The needed timeout values should be determined based on many parameters: the load on the server, the domain number, the code of domains etc. etc. You may try to increase the values a little bit and monitor the server: if the issue persists, increase the values again and repeat it if necessary.
    As for the stuck server: it is needed to check the /var/log/messages or /var/log/syslog to find additional information about what is happening on the server, the timeout values might not be the root cause of the issue. Anyway, I recommend you to create a ticket as per https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support- to investigate the issue in more details.

Please sign in to leave a comment.

Have more questions? Submit a request