• Resolved Luke Cavanagh

    (@lukefiretoss)


    An issue I spotted that won’t affect performance greatly, but will trigger max_children/PHP process count limit, site is making several ajax calls for shortpixel_image_processing that are returning 400. WP returns 400 on admin-ajax.php if the action isn’t defined. The file that adds the wp_ajax_nopriv_shortpixel_image_processing action is at:

    shortpixel-image-optimiser/class/controller/front_controller.php

    This file is being loaded by admin-ajax.php, however it is not defining the action. This is likely an issue in the plugin itself. I believe this is due to the $is_front variable being false – it is set to true if is_admin() is false. admin-ajax.php is technically an admin page, so is_admin() returns true in:

    shortpixel-image-optimiser/class/model/environment_model.php

    And as a result the add_action is never called, leaving these requests to 400. Each page is making 4-5 of these requests, ergo 4-5 times the number of requests hitting php-fpm.

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

The topic ‘front-end admin-ajax.php calls to shortpixel_image_processing’ is closed to new replies.