Title: Deactivating Plugin causing Internal Server Error
Last modified: February 22, 2020

---

# Deactivating Plugin causing Internal Server Error

 *  [arindam4u](https://wordpress.org/support/users/arindam4u/)
 * (@arindam4u)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/deactivating-plugin-causing-internal-server-error/)
 * 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 6 years, 3 months ago by [arindam4u](https://wordpress.org/support/users/arindam4u/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/deactivating-plugin-causing-internal-server-error/#post-12469791)
 * Hi [@arindam4u](https://wordpress.org/support/users/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](https://wordpress.org/support/users/arindam4u/)
 * (@arindam4u)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/deactivating-plugin-causing-internal-server-error/#post-12650355)
 * 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](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/deactivating-plugin-causing-internal-server-error/#post-12700221)
 * Hi [@arindam4u](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/wp-rest-cache/assets/icon-256x256.png?rev=3328849)
 * [WP REST Cache](https://wordpress.org/plugins/wp-rest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rest-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/deactivating-plugin-causing-internal-server-error/#post-12700221)
 * Status: not resolved