• Resolved wpusr007

    (@wpusr007)


    Hello,

    For the last week or so I have been constantly experiencing

    Gateway Timeout, The gateway did not receive a timely response from the upstream server or application.

    errors when I hit “Edit Page” on multiple pages… Site still works but is slower than usual. Admin pages also work.

    This started about a week ago after, and I believe it started after I updated some plugins (Pods, etc). Naturally I have tried to setup WP in debug mode but no matter what I try, the debug.log file remains empty (although the admin page > Site Health shows the WP_DEBUG_LOG option being activated and warning me of potential leak of sensitive data to normal users…).

    For the debug log, I created the file (using touch), set the ownershipo to apache:apache (same as running httpd), and set the perms to 777.

    wp-config.php contains:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', true );

    I currently have the following plugins installed:

    Admin Menu Editor
    Custom Post Type Permalinks
    Insert PHP Code Snippet
    Kaya QR Code Generator
    Pods - Custom Content Types and Fields
    Pods Alternative Cache
    Search & Filter
    TablePress
    TablePress Extension: Automatic URL conversion
    TablePress Extension: DataTables Buttons
    TablePress Extension: Parse Shortcodes before Formulas
    TablePress Extension: Pods tables
    TablePress Extension: Single Cell Content Shortcode
    WP Date and Time Shortcode
    Yoast Duplicate Post

    Help is appreciated!
    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator James Huff

    (@macmanx)

    You’re right, this problem may be a plugin or theme conflict. Please attempt to disable all plugins and switch to the default Twenty Twenty-One theme. If the problem goes away, enable them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you while you’re still logged in without affecting normal visitors to your site.

    Thread Starter wpusr007

    (@wpusr007)

    Hello James,

    Thanks for your reply! Using the Health Check plugin, I may have found the issue: Pods Alternative Cache plugin. Once I removed it, the site got a bit faster (AFAIK) and the Gateway Error “seems” to be gone (I put seems in quotes because each time I think the problem is fixed it reappears.. ??

    For now lets see if it comes back.

    Unfortunately, I am stuck with more problems, albeit minor ones but I dont understand what they mean.

    In the Site Health page, I now see the following errors:

    The REST API encountered an error
    The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.
    
    The REST API request failed due to an error.
    Error: [] cURL error 60: SSL certificate problem: self signed certificate
    Your site could not complete a loopback request
    Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.
    
    The loopback request to your site failed, this means features relying on them are not currently working as expected.
    Error encountered: (0) cURL error 60: SSL certificate problem: self signed certificate

    They both seem to be caused by CURL problems, but I dont understand what has changed to cause this. FYI this WP site is running on a headless machine in my home and WordPress is NOT accessible from the internet, only from LAN. It uses a self signed SSL cert to “secure” apache but its been like that since I installed WP about 7 months ago and never saw anything like that before…. I did run a OS update last week thinking it might help (which it didnt) so perhaps CURL got updated and its having issues now?

    How do I troubleshoot this? What is CURL trying to do to cause these errors??

    • This reply was modified 2 years, 7 months ago by wpusr007.
    Moderator James Huff

    (@macmanx)

    The main issue here is your self-signed SSL certificate.

    It will work properly with a valid SSL certificate.

    Thread Starter wpusr007

    (@wpusr007)

    Okay, so I take that something in WP’s code got updated to do this check because like I said, I haven’t seen these errors until today…

    This WP instance is more or less offline and only accessed by me. Purchasing a real SSL cert sounds overkill and unnecessary…

    Moderator James Huff

    (@macmanx)

    Yeah, the problem is pretty clear in the error message, so that’s what will have to be fixed.

    You can generate a free valid certificate from Let’s Encrypt: https://letsencrypt.org/

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Note: There’s probably package for your OS (I assume you’re using a Linux VPS) to generate and install certificates. Look up “certbot” and your OS for info.

    Thread Starter wpusr007

    (@wpusr007)

    Thanks guys,

    will do!

    But I’m still trying to figure out why this problem showed up today, for no reasons…Unless curl got updated yesterday and no longer tolerates self signed certs without throwing a tantrum?

    As for the cert used to access this specific VM (its running on Rocky Linux which is a drop-in replacement for the defunct Centos), why is it used by curl in the first place? I mean why is curl complaining about the cert used on this machine if it is not trying to access “localhost”, or is it?

    Is there a way to see (verbose) what WordPress is trying to accomplish with CURL which would generate these errors? IMO the health page should provide more than just

    Error: [] cURL error 60: SSL certificate problem: self signed certificate

    Sorry I’m just trying to make sense of this and understand how these things are working together.

    Did you change your site url to https recently? If your site runs over https, this will cause no issues if you accept the certificate in your browser, but CURL will still have an issue with that. When the site is on https, the CURL checks will also run over https, and will correctly run an error about the certificate.

    I’d expect this to cause no issues, other than a notification in the Health Check page. The CURL requests are to my knowledge mainly used for tests, to notify you of possible issues, for example with an invalid certificate.

    As the certificate is intentionally self signed, you can ignore that.

    Thread Starter wpusr007

    (@wpusr007)

    Hello Rogier, no I havent changed anything on that front since the VM was built in Nov 2021… Same cert and same apache config.

    The only thing I did was the system update (dnf update) last week thinking it may help with the slowness and the “Gateway Timeout” but it was not related after all…

    My only explanation is that curl got updated and now doesnt tolerate self signed certs. I will ignore that for now, but it would be nice to perhaps mark notifications/alerts as “acknowledged” in the checks so they do not remain active and cause the “Should be improved” and “THis site has critical issues” warning… Think of Freenas/Truenas here…

    More an improvement idea than anything else ??

    I will still look into the lets encrypt thing to make things cleaner.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Gateway Timeout potentially caused by plugin updates’ is closed to new replies.