Question

Site keep going down, get 504 error

Posted August 20, 2021 69 views
WordPress

Hi,
We have been facing a peculiar issue. We asked on various other forums/wordpress and few people said it is to do with your server on Digital Ocean

https://prnt.sc/1qd42pc

We get 504 error 10-15 mins randomly and then the site comes back up. What could be the issue?
We checked DNS maps too, that is fine.

Stunning thing is we found nothing in the error logs. Am not sure why is this happening, can anyone help?

Website: www.gadgetbridge.com

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

There could be a lot of things that could cause that error. I would recommend starting with the following:

  • Make sure that the server has enough resources. You can follow the steps here on how to check that:

https://www.digitalocean.com/community/tutorials/how-to-monitor-cpu-use-on-digitalocean-droplets

  • Which logs exactly have you checked? I would recommend checking the following: the PHP error log, the Apache or Nginx error logs depending on the one that you use, the MySQL error log, the syslogs.

  • I could also suggest adding a caching plugin for your site so that the overall load on the server could be reduced

Let me know how it goes.
Regards,
Bobby

by Melissa Anderson
The amount of memory, the size of the cache, the speed of the input and output, and the speed and availability of processing power are key elements that affect the performance of your infrastructure. In this article, we'll focus on understanding and monitoring CPU usage.We'll describe how to use two common utilities in order to learn about your CPU usage, how to set up DigitalOcean monitoring to watch performance over time, and how to set set Alert Policies to notify you about significant chang
  • Hi,
    The CPU usage never went above 50% at any time.
    We already have a very strong cache plugin in our Wordpress (Wp-rocket).

    We checked Wordpress error logs and logs in Plesk. Both did not show any errors.

    Found this Error in NGINX error log:

    2021-08-20 16:49:31 Error 162.158.94.161 139647#0: *569170 upstream timed out (110: Connection timed out) while reading response header from upstream
    2021-08-20 16:49:31 Error 172.70.142.213 139647#0: *569169 upstream timed out (110: Connection timed out) while reading response header from upstream
    2021-08-20 16:49:36 Error 162.158.92.41 139647#0: *569173 upstream timed out (110: Connection timed out) while reading response header from upstream
    2021-08-20 16:49:36 Error 172.70.34.191 139647#0: *569175 upstream timed out (110: Connection timed out) while reading response header from upstream

    This is from when the server was down.

    Also these:
    2021-08-20 16:15:17 Error 162.158.94.205 [client 162.158.94.205] ModSecurity: Access denied with code 403 (phase 1). Matched phrase “/.env” at REQUESTURI. [file “/etc/apache2/modsecurity.d/rules/comodofree/02GlobalGeneric.conf”] [line “120”] [id “210492”] [rev “3”] [severity “CRITICAL”] [tag “CWAF”] [tag “Generic”] [hostname “www.gadgetbridge.com”] [uri “/.env”] [uniqueid “YR-VFTHbiRiT-RXp9qFWaQAAARE”]
    2021-08-20 16:22:21 Error 108.162.229.249 [client 108.162.229.249] ModSecurity: Access denied with code 403 (phase 1). Matched phrase “/.git/” at REQUEST
    URI. [file “/etc/apache2/modsecurity.d/rules/comodofree/02GlobalGeneric.conf”] [line “120”] [id “210492”] [rev “3”] [severity “CRITICAL”] [tag “CWAF”] [tag “Generic”] [hostname “www.gadgetbridge.com”] [uri “/.git/config”] [uniqueid “YR-WveAIh94WWiLq1jNE3gAAAIw”]
    2021-08-20 17:04:45 Error 172.68.155.153 [client 172.68.155.153] ModSecurity: Access denied with code 403 (phase 2). Operator EQ matched 0 at REQUESTCOOKIESNAMES. [file “/etc/apache2/modsecurity.d/rules/comodofree/26Apps_WordPress.conf”] [line “155”] [id “225170”] [rev “3”] [msg “COMODO WAF: Sensitive Information Disclosure Vulnerability in WordPress 4.7 (CVE-2017-5487)||www.gadgetbridge.com|F|2”] [severity “CRITICAL”] [tag “CWAF”] [tag “WordPress”] [hostname “www.gadgetbridge.com”] [uri “/wp-json/wp/v2/users/1”] [unique_id “YR-greAIh94WWiLq1jNHOgAAAIY”]