• Resolved tpg73

    (@tpg73)


    Thank you for reading. Thanks in advance.

    WordPress version: 6.5.3
    Query Monitor version: 3.16.4

    I have a staging environment and a local environment for a certain site.

    I have installed query monitor only in the local environment (but the plugin is stopped).

    When I imported the same CSV file in each environment using the really-simple-csv-importer plugin, an error of insufficient memory occurred only in the local environment.

    The memory limit is the same for each environment.

    I tried uninstalling query monitor and the memory shortage was resolved.

    When I installed query monitor again, a memory shortage occurred.

    In other words, it seems that just having query monitor installed has an effect even if the plugin is stopped.

    Below are stack traces of memory shortage with and without the plugin installed (some parts have been edited).

    Note that the memory limit is intentionally lowered to cause an error even when the plugin is not installed.

    [When the plugin is not installed]

    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /wordpress/wp-includes/meta.php on line 1194
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP Stack trace:
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 1. {main}() /wordpress/wp-admin/admin.php:0
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 2. RS_CSV_Importer->dispatch() /wordpress/wp-admin/admin.php:364
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 3. RS_CSV_Importer->import() /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:444
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 4. RS_CSV_Importer->process_posts() /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:90
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 5. RS_CSV_Importer->save_post($post = , $terms = [], $thumbnail = FALSE, $is_update = TRUE) /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:384
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 6. RSCSV_Import_Post_Helper->update($data = ) /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:122
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 7. wp_update_post($postarr = , $wp_error = TRUE, $fire_after_hooks = *uninitialized*) /wordpress/wp-content/plugins/really-simple-csv-importer/class-rscsv_import_post_helper.php:139
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 8. get_post($post = , $output = 'ARRAY_A', $filter = *uninitialized*) /wordpress/wp-includes/post.php:4873
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 9. WP_Post->to_array() /wordpress/wp-includes/post.php:1112
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 10. WP_Post->__get($key = 'page_template') /wordpress/wp-includes/class-wp-post.php:382
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 11. get_post_meta($post_id = , $key = '_wp_page_template', $single = TRUE) /wordpress/wp-includes/class-wp-post.php:309
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 12. get_metadata($meta_type = 'post', $object_id = , $meta_key = '_wp_page_template', $single = TRUE) /wordpress/wp-includes/post.php:2594
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 13. get_metadata_raw($meta_type = 'post', $object_id = , $meta_key = '_wp_page_template', $single = TRUE) /wordpress/wp-includes/meta.php:574
    [26-Jul-2024 11:01:03 Asia/Tokyo] PHP 14. update_meta_cache($meta_type = 'post', $object_ids = [0 => ]) /wordpress/wp-includes/meta.php:647

    [If you have installed the plugin]

    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /wordpress/wp-includes/functions.php on line 7158
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP Stack trace:
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 1. {main}() /wordpress/wp-admin/admin.php:0
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 2. RS_CSV_Importer->dispatch() /wordpress/wp-admin/admin.php:364
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 3. RS_CSV_Importer->import() /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:444
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 4. RS_CSV_Importer->process_posts() /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:90
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 5. RS_CSV_Importer->save_post($post = , $terms = [], $thumbnail = FALSE, $is_update = TRUE) /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:384
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 6. RSCSV_Import_Post_Helper->update($data = ) /wordpress/wp-content/plugins/really-simple-csv-importer/rs-csv-importer.php:122
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 7. wp_update_post($postarr = , $wp_error = TRUE, $fire_after_hooks = *uninitialized*) /wordpress/wp-content/plugins/really-simple-csv-importer/class-rscsv_import_post_helper.php:139
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 8. wp_insert_post($postarr = , $wp_error = TRUE, $fire_after_hooks = TRUE) /wordpress/wp-includes/post.php:4930
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 9. do_action($hook_name = 'save_post', ...$arg = /wordpress/wp-includes/post.php:4828
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 10. WP_Hook->do_action($args = /wordpress/wp-includes/plugin.php:517
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 11. WP_Hook->apply_filters($value = '', $args = [0 => 4841, 1 => class WP_Post { , 2 => TRUE]) /wordpress/wp-includes/class-wp-hook.php:348
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 12. AIOSEO\Plugin\Common\Sitemap\Ping->schedule($postId = 4841, $post = class WP_Post { ) /wordpress/wp-includes/class-wp-hook.php:326
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 13. AIOSEO\Plugin\Common\Models\Post::getPost($postId = 4841) /wordpress/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Ping.php:53
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 14. AIOSEO\Plugin\Common\Utils\Database->run($reset = *uninitialized*, $return = *uninitialized*, $params = *uninitialized*) /wordpress/wp-content/plugins/all-in-one-seo-pack/app/Common/Models/Post.php:107
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 15. wpdb->get_results($query = 'SELECT \n\t*\nFROM wp_aioseo_posts\nWHERE 1 = 1 AND\n\t
    post_id = 4841\n/* 1 = 1 */', $output = 'OBJECT') /wordpress/wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Database.php:1267
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 16. QM_DB->query($query = 'SELECT \n\t*\nFROM wp_aioseo_posts\nWHERE 1 = 1 AND\n\tpost_id = 4841\n/* 1 = 1 */') /wordpress/wp-includes/class-wpdb.php:3146
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 17. wpdb->query($query = 'SELECT \n\t*\nFROM wp_aioseo_posts\nWHERE 1 = 1 AND\n\tpost_id = 4841\n/* 1 = 1 */') /wordpress/wp-content/plugins/query-monitor/classes/DB.php:29
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 18. wpdb->_do_query($query = 'SELECT \n\t*\nFROM wp_aioseo_posts\nWHERE 1 = 1 AND\n\tpost_id = 4841\n/* 1 = 1 */') /wordpress/wp-includes/class-wpdb.php:2263
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 19. wpdb->get_caller() /wordpress/wp-includes/class-wpdb.php:2358
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 20. wp_debug_backtrace_summary($ignore_class = 'wpdb', $skip_frames = *uninitialized*, $pretty = *uninitialized*) /wordpress/wp-includes/class-wpdb.php:4136
    [26-Jul-2024 11:04:22 Asia/Tokyo] PHP 21. debug_backtrace($options = FALSE) /wordpress/wp-includes/functions.php:7158

    My hope is that if I have the query monitor installed and it is stopped, there will be no negative effects.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    I’m not sure what’s going on, but having Query Monitor installed but not active should have no effect on your site.

    Can you check to ensure the wp-content/db.php file is not in place after deactivating the plugin?

    Thread Starter tpg73

    (@tpg73)

    Thank you for checking. The problem has been resolved.

    When I checked wp-content/db.php, it was found to be a corrupted file. I deleted it with the rm command and the problem was resolved.

    Also, after that, when I reinstalled and enabled the plugin, wp-content/db.php was created, and when I disabled the plugin, wp-content/db.php was deleted.

    It seems there was a problem with my environment. This was very helpful. Now I can use the plugin with peace of mind. Thank you.

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