Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25486
    Matteo
    Guest

    Hi,
    after last update I have error 504 Gateway Time out in these cases:

    1) publish a post
    2) update a post
    3) write a comment as admin/logged user

    I don’t have problems if I deactivate your plugin W3 Total Cache.

    #25496
    Jesse Owens
    Keymaster

    Hi Matteo-
    From what you’ve described, the timeout is occurring whenever the cache is automatically purged.
    The first thing to check is your debug log. Add the following lines to your wp-config.php file:

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

    Once you have that, enable the plugin and update a post to recreate the error. Now, you’ll have a log of any errors in wp-content/debug.log . Let us know what errors you see there and we can do some more digging.

    I also noticed you’re using an NGINX proxy. If you have root access to your server, I recommend setting a few of the NGINX configurations in /etc/nginx/conf.d/timeout.conf:

    proxy_connect_timeout 600; 
    proxy_send_timeout 600; 
    proxy_read_timeout 600; 
    send_timeout 600;

    In addition, I’d recommend setting your PHP execution time in php.ini.

    max_execution_time 300

    Once you’ve made all those changes, restart NGINX and see if the error persists.

    #25533
    Matteo
    Guest

    Hi Jesse,
    I activated debug mode and updated a post, I have the same 504 errors.

    WordPress doesn’t generate any log file. Why?

    #25546
    Jesse Owens
    Keymaster

    Hi Matteo-
    If WordPress isn’t throwing any errors, then I’d suspect the timeout values in NGINX or PHP are too low. Did you get a chance to check those?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Error 504 Gateway Time out’ is closed to new replies.