• I was going through a clients website this evening and noticed that there is a 58Mb error_log with 66,799 lines in the web root directory (public_html). This seems **slightly** excessive to me…! WP_DEBUG is not set in wp-config.php: define(‘WP_DEBUG’, false).

    The last three lines of the error_log are as below. This is beign run on a CentOS 7.7 server.

    How can I begin to troubleshoot the problem on this site?

    [21-Feb-2020 23:32:40 UTC] WordPress database error Duplicate entry ‘742237’ for key ‘PRIMARY’ for query INSERT INTO ha_options (option_name, option_value, autoload) VALUES (‘_site_transient_itsec_wp_upload_dir’, ‘a:6:{s:4:\”path\”;s:55:\”/home/example/public_html/wp-content/uploads/2020/02\”;s:3:\”url\”;s:53:\”https://www.example.com/wp-content/uploads/2020/02\”;s:6:\”subdir\”;s:8:\”/2020/02\”;s:7:\”basedir\”;s:47:\”/home/example/public_html/wp-content/uploads\”;s:7:\”baseurl\”;s:45:\”https://www.example.com/wp-content/uploads\”;s:5:\”error\”;b:0;}’, ‘no’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload) made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, ITSEC_Core->handle_upgrade, ITSEC_Core::get_saved_plugin_build, ITSEC_Modules::get_setting, ITSEC_Modules::get_settings_obj, ITSEC_Modules::load_module_file, include_once(‘/plugins/ithemes-security-pro/core/modules/global/settings.php’), ITSEC_Settings->__construct, ITSEC_Settings->load, ITSEC_Global_Settings_New->get_defaults, ITSEC_Core::get_storage_dir, ITSEC_Core::get_wp_upload_dir, set_site_transient, add_site_option, add_network_option, add_option

    [21-Feb-2020 23:32:40 UTC] WordPress database error Duplicate entry ‘742237’ for key ‘PRIMARY’ for query INSERT INTO ha_options (option_name, option_value, autoload) VALUES (‘_site_transient_timeout_aioseop_update_check_time’, ‘1582349560’, ‘no’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload) made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, AIOSEOP_Updates->version_updates, AIOSEOP_Updates->do_feature_updates, set_site_transient, add_site_option, add_network_option, add_option

    [21-Feb-2020 23:32:40 UTC] WordPress database error Duplicate entry ‘742237’ for key ‘PRIMARY’ for query INSERT INTO ha_options (option_name, option_value, autoload) VALUES (‘_site_transient_aioseop_update_check_time’, ‘1582327960’, ‘no’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload) made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, AIOSEOP_Updates->version_updates, AIOSEOP_Updates->do_feature_updates, set_site_transient, add_site_option, add_network_option, add_option

Viewing 3 replies - 1 through 3 (of 3 total)
  • Looks like iThemes Security plugin and All In One SEO plugin are using the same ID for an option. You should probably disable both and see if your database needs repair (using phpMyAdmin or a plugin that does similar).
    You can ask at either plugin support forum (or both) for help on that option clash.
    And delete the error log. I’m sure it will grow again if you can’t figure it out and reactivate both plugins. (maybe delete that one option with ID 742237?)

    Thread Starter xorcise

    (@xorcise)

    After disabling/removing ithemes and All In One the error log does recreate itself, but much slower – only 15 new lines appeared in the last while.

    I took a look at the database, and noticed that the tables for this site all have two AUTOINCREMENT options set, as below. MySQL allows you to specify what number to begin auto incrementing from using the autoincrement=X option, but I am thinking maybe having it listed twice here is causing some sort of problem. This is the only site from this server which has autoincrement=X set.

    Is the problem bigger than just these two plugins do you think?

      error_log entries:

    [23-Feb-2020 09:06:53 UTC] WordPress database error Duplicate entry '742237' for key 'PRIMARY' for query INSERT INTOha_options(option_name,option_value,autoload) VALUES ('_transient_doing_cron', '1582448813.2843890190124511718750', 'yes') ON DUPLICATE KEY UPDATEoption_name= VALUES(option_name),option_value= VALUES(option_value),autoload= VALUES(autoload`) made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, wp_cron, spawn_cron, set_transient, add_option

    [23-Feb-2020 09:08:06 UTC] WordPress database error Duplicate entry ‘742237’ for key ‘PRIMARY’ for query INSERT INTO ha_options (option_name, option_value, autoload) VALUES (‘_transient_doing_cron’, ‘1582448886.0096879005432128906250’, ‘yes’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload) made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, wp_cron, spawn_cron, set_transient, add_option`

      MySQL settings:

    -- AUTO_INCREMENT for tableha_options
    ALTER TABLE ha_options
    MODIFY option_id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=738181;

    — AUTO_INCREMENT for table ha_postmeta
    ALTER TABLE ha_postmeta
    MODIFY meta_id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6839;

    — AUTO_INCREMENT for table ha_posts
    ALTER TABLE ha_posts
    MODIFY ID bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=894;`

    Yes, it’s still a problem, and it says that same ID despite what the auto-increment says. It is getting fewer errors because there is less churn in the database.
    What is weird is that the SQL says ON DUPLICATE KEY UPDATE, but it just gets the error instead.
    Maybe look at one of your working site’s database to see what the auto-increment looks like…and change this one to be similar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘58Mb error_log file!’ is closed to new replies.