WPIntell

Source evidence

Reduce Admin-ajax calls?

Plugins Garbage Collector (Database Cleanup) · support · 2020-09-06T12:11:00+00:00

complaintsentiment
highseverity
1.0relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 31 rows with source links

12.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

27 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
ruudiz unresolved
Hello! First of all, thank you for this useful plugin. Recently I have 504 errors for my site that is hosted by WPEngine. WPEngine stated that the problem is a large amount of admin-ajax calls that come from this plugin (in combination with other plugins). Is there a way for Plugins Garbage Collector (Database Cleanup) developers to reduce these calls? If that is possible that would be great. Thanks! Hi, It’s a headache for the shared servers users when it’s not enough resources from a used service… Version 0.12 of PGC includes this update: * Update: Server side “Fatal error: Maximum execution time of NN seconds exceeded” should not take place now. PGC scans plugins with large quantity of files by splitting job to smaller parts per 500 files. So you have 2 variants: 1) roll-back to the previous version 0.11.1 or 2) open wp-content/plugins/plugins-garbage-collector/includes/lib.php file, find line #278: $files_to_process = 500; and replace 500 to 1000 or any number of your choice. It will reduce the quantity of AJAX calls from PGC plugin during scanning of your plugins files for the usage of database tables. I will allow to use PHP constant (defined at wp-config.php usually) to change this value without modifying PGC plugin source code with the next update. General logic realized at PGC: 1 AJAX call per installed plugin. So you still will have many AJAX calls from PGC in case you have many plugins installed. This reply was modified 5 years, 8 months ago by Vladimir Garagulya . Hello Vladimir, Yes, it turns out that I am on a shared server. Although I thought that WPEngine is a powerful hosting service and I should not experience these issues. I contacted WPEngine and it turned out that another account on the same server had overloaded the server with AJAX calls. So when I ran PGC scan, it was an extra load. I was migrated to a different server and this 504 issue disappeared. Thank you for your information! All my sites have PGC. I will look into this possibility to reduce the quantity of AJAX calls from PGC plugin during scanning, because I have a fair amount of plugins.

Comments

3 shown
Vladimir Garagulya 2020-09-08T03:31:00+00:00

Hi, It’s a headache for the shared servers users when it’s not enough resources from a used service… Version 0.12 of PGC includes this update: * Update: Server side “Fatal error: Maximum execution time of NN seconds exceeded” should not take place now. PGC scans plugins with large quantity of files by splitting job to smaller parts per 500 files. So you have 2 variants: 1) roll-back to the previous version 0.11.1 or 2) open wp-content/plugins/plugins-garbage-collector/includes/lib.php file, find line #278: $files_to_process = 500; and replace 500 to 1000 or any number of your choice. It will reduce the quantity of AJAX calls from PGC plugin during scanning of your plugins files for the usage of database tables. I will allow to use PHP constant (defined at wp-config.php usually) to change this value without modifying PGC plugin source code with the next update.

Vladimir Garagulya 2020-09-08T03:33:00+00:00

General logic realized at PGC: 1 AJAX call per installed plugin. So you still will have many AJAX calls from PGC in case you have many plugins installed. This reply was modified 5 years, 8 months ago by Vladimir Garagulya .

ruudiz 2020-09-08T07:16:00+00:00

Hello Vladimir, Yes, it turns out that I am on a shared server. Although I thought that WPEngine is a powerful hosting service and I should not experience these issues. I contacted WPEngine and it turned out that another account on the same server had overloaded the server with AJAX calls. So when I ran PGC scan, it was an extra load. I was migrated to a different server and this 504 issue disappeared. Thank you for your information! All my sites have PGC. I will look into this possibility to reduce the quantity of AJAX calls from PGC plugin during scanning, because I have a fair amount of plugins.