Support » Plugin: Plugins Garbage Collector (Database Cleanup) » Reduce Admin-ajax calls?

  • 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.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vladimir Garagulia



    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
    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.

    Plugin Author Vladimir Garagulia


    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.

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.