Memcached and Redis 504 error

Hi,

I'm trying to configure an object Cache on my Wordpress website, I tried both Redis and Memcached.

1st attempt:

When I connect to the Redis using Redis Object Cache plugin suddenly website become unresponsive and throws an 504 error.

After deleting Redis Object Cache plugin the 504 error fixed.

2nd attempt:

I had configured memcached on my server, installed Memcached is your friend plugin and I had added "extension=memcached.so" to the last line of php.ini file and restarted my server. Suddenly website became unresponsive and throws an 504 error.

when I removed "extension=memcached.so" from php.ini file and restarted my server the 504 error resolved.

Do someone knows what's happening why this 504 is appearing? Why I'm unable to configure any object cache on my website?

  • Prathamesh Palve
    • Staff

    Hello KIRANRAJ

    I hope you are doing good today and thank you for giving us time to look into it.

    The 504 Gateway Timeout error is an HTTP status code that means that one server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser.

    A simple workaround would be to try and increase the maximum execution time. You can do this from the php.ini file. Usually, php.ini file is found in the public_html directory or the directory in which the wp-config.php file resides. If you do not see the php.ini file in the directory where the wp-config.php file resides, you'll have to create a php.ini file with the following rules, and upload this using an FTP client to your root directory, i.e. the path where wp-conifg.php resides.

    max_execution_time = 300

    Please paste the above line in the php.ini file, save the changes and then try to configure an Object Cache on your site. You can change the value in the above command which is 300 to 600 and then give a try.

    If that doesn't work, I will have to take a closer look at the site and would need your site and the FTP access. Please grant me support access to the site. You can enable the Support access from the WPMU Dashboard plugin. Here are the steps to give the support access.

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    To send is the FTP access, you must send us your details through our safe contact form as this is a public forum https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Prathamesh"

    - FTP credentials (host/username/password/path of site in question)
    - link back to this thread for reference

    Looking forward to hearing from you.

    Regards,
    Prathamesh

  • Prathamesh Palve
    • Staff

    Hello KIRANRAJ

    I hope you are doing good today. It took me a bit longer to get back to you here.

    I went ahead, checked your site and did the following:

    1. Activate the Redis plugin
    2. Check 'wp-config' file
    3 Check Redis Diagnostics

    I noticed that there is some problem with the connection to the Redis Server/ Database. It is because there is some issue with the access to it as the plugin is not able to connect to the Redis Server/ Database.

    Can you verify configuration details to the Redis Server so that I could go ahead and test as to why the issue is happening?

    Looking forward to hearing from you.

    Regards,
    Prathamesh

    • KIRANRAJ
      • WPMU DEV Initiate

      Hi Prathamesh,

      I had checked the Redis connection issue & I fixed the connection issue of it. Now Redis Object Cache plugin is properly connected to the Redis VM.

      After the connection the same issue is happening again that I mentioned earlier, our site performance is affected now our website is really slow.
      And I had noticed one more thing when I hit "Flush Cache" Button on Redis Object cache plugin our website is throwing a 500 Error.

      Please help us to find & Fix the Redis issue. Soon as possible.

      Looking forward to hearing from you.

      Best Regards,
      KIRANRAJ

  • KIRANRAJ
    • WPMU DEV Initiate

    Hi,

    We had Disconnected Redis Cache Server from Redis object Cache plugin (Since it's making 500, 504 Errors on our website) We can't keep our website down for long time since our website is a Marketplace.

    When you're debugging on our website feel free to connect to Redis Cache server from Redis Object Cache plugin.

  • Prathamesh Palve
    • Staff

    Hello KIRANRAJ

    I hope you are doing good and thank you for doing the required configuration for us.

    This seems to be an issue from your hosting provider. Please ask your hosting provider to look into it and also ask for the server side logs so to understand where the issue is exactly coming from.

    Feel free to get back to us here if you have any doubts or need any help further.

    Regards,
    Prathamesh

  • Prathamesh Palve
    • Staff

    Hello KIRANRAJ

    It took a little more time to get back to you here. While trying to connect to your server via SSH, I was unable to connect as I encountered an error: Connection timed out after 20 seconds of inactivity.

    Seems like something might have crashed your SSH daemon or maybe the firewall is enabled. Can you check this on your end once?

    Looking forward to hearing from you.

    Regards,
    Prathamesh

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.