• Hello,

    I was facing issues with my Memcached due to high load. I needed to deactivate this plugin. But I am facing Internal server error and deactivating doesn’t work.
    Here is the Log:

    2020/02/22 01:58:27 [error] 19471#0: *3077 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.240, server: localhost, request: "GET /wp-admin/plugins.php?action=deactivate&plugin=wp-rest-cache%2Fwp-rest-cache.php&plugin_status=all&paged=1&s&_wpnonce=fd7cc245de HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket", host: "XXX.com", referrer: "https://XXX.com/wp-admin/plugins.php"
    2020/02/22 01:59:51 [error] 19471#0: *3077 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.240, server: localhost, request: "GET /wp-admin/plugins.php?action=deactivate&plugin=wp-rest-cache%2Fwp-rest-cache.php&plugin_status=all&paged=1&s&_wpnonce=fd7cc245de HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket", host: "XXX.com", referrer: "https://XXX.com/wp-admin/plugins.php"

    Also I want to know if I can ignore caching for “search” query of /wp/v2/posts
    For example: If someone search “fundamentals of” in a particular category, cache record is generated like /wp/v2/posts?categories=319&order=asc&orderby=relevance&per_page=5&search=fundamentals+of

    Can I disable all “search” query from caching?

    Thank you.

    • This topic was modified 5 years, 1 month ago by arindam4u.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Richard Korthuis

    (@rockfire)

    Hi @arindam4u

    I am sorry to hear you are facing this error. It appears you are encoutering a timeout, due to the fact the plugin is trying to delete all created caches when you deactivate the plugin. And you are probably having a lot of caches, which makes this a process that takes a lot of time. Thank you for reporting this issue, we have to look into it and come up with a permanent solution for this.

    You could try and delete them all via Settings > WP REST Cache > API Endpoint Caches. This is however a lot of work, since you cannot simply delete them all at once. Or you could add the line:
    set_time_limit(0);
    In wp-content\plugins\wp-rest-cache\includes\class-deactivator.php before line 29. (This is a quick fix and we will look into a better fix for the future.) And then deactivate the plugin (Deactivating will take some time, but the timeout should be prevented).

    Thread Starter arindam4u

    (@arindam4u)

    Sorry for late reply. However thank you so much for your response.
    I was able to delete and deactivate the plugin by deleting all endpoints.

    However, I have created an app which uses WP REST API and there are so many categories, tags and so many posts (no woocommerce, only WP REST API V2 for default Posts) and therefore so many caches are created by the users. I have also implemented search in the app and it also via WP REST API (as I am unable to find any other suitable solution).

    Caching REST API Calls are necessary for the app performance and thanks to your plugin it works really so great. I cannot thank you enough for this.

    But my WordPress authors are really active also. They post nearly 20-30 posts daily.
    So the endpoint caches are hugely created and also flushed. I have selected Cache regeneration for Once daily and maximum number of 5.
    Can you suggest me what should be the setting?

    Plugin Author Richard Korthuis

    (@rockfire)

    Hi @arindam4u

    The optimum setting is something we cannot determine for you as it greatly depends on your host server. A lightweight server will only be able to process a few requests at a time, while a more advanced server can easily manage hundreds of requests at a time. So this is something you would have to discuss with your hosting company or would have to test.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deactivating Plugin causing Internal Server Error’ is closed to new replies.