Support » Fixing WordPress » wp-cron.php?doing_wp_cron – results in a Database “Duplicate entry”

  • Hi @all,

    My wordpress installation is still working fine, unfortunately the wp-cron.php makes trouble with permanents updates into the database!

    [Wed Dec 07 07:35:46 2016] [error] [client nnn.nnn.nnn.nnn] WordPress-Datenbank-Fehler Duplicate entry 'eclipse' for key 'slug' f\xc3\xbcr Abfrage INSERT INTOterms(name,slug,term_group`) VALUES (‘Eclipse’, ‘eclipse’, 0) von do_action_ref_array, call_user_func_array, _wp_batch_split_terms, _split_shared_term, referer: http://www.2axels-company.de/wp-cron.php?doing_wp_cron=1481092546.1583940982818603515625

    [Wed Dec 07 07:35:46 2016] [error] [client nnn.nnn.nnn.nnn] WordPress-Datenbank-Fehler Duplicate entry ‘ubuntu’ for key ‘slug’ f\xc3\xbcr Abfrage INSERT INTO terms (name, slug, term_group) VALUES (‘Ubuntu’, ‘ubuntu’, 0) von do_action_ref_array, call_user_func_array, _wp_batch_split_terms, _split_shared_term, referer: http://www.2axels-company.de/wp-cron.php?doing_wp_cron=1481092546.1583940982818603515625`

    These entries are still exits inside the tables. I don’t understand, why wp-cron.php tries to insert them again.
    What further kind of logs could i send to you, so that someone could help me? My database is clean and running. Some of the support threads recommend to repair the database tables for this instance. I’ve done this already.

    My database version:

    mysql –version
    mysql Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.2

    on debian wheezy.

    any help is highly appreciated, because my update to wordpress 4.7 couldn’t running, because of this issue.

    Kind regards
    Axel

Viewing 5 replies - 1 through 5 (of 5 total)
  • That’s very interesting.

    Term splitting was introduced in WordPress 4.3 and there wasn’t any change to that in 4.7 as far as I can tell.

    These queries are only executed when WordPress detects some terms that haven’t been split yet. The finished_splitting_shared_terms option is set accordingly. What’s the value of that option in your wp_options table?

    Also, what does the following SQL query return?

    SELECT tt.term_id, t.*, count(*) as term_tt_count FROM wp_term_taxonomy tt
    		 LEFT JOIN wp_terms t ON t.term_id = tt.term_id
    		 GROUP BY t.term_id
    		 HAVING term_tt_count > 1
    		 LIMIT 1

    Pinging @pento as he might know better what data is needed to resolve this.

    Thread Starter blaufotograph

    (@blaufotograph)

    Hi Pascal,

    thank you very much for your answer.

    The field “finished_splitting_shared_terms” doesn’t exists. But the follwing one:

    wp_options:
    —————-

    a:10:{i:1481406805;a:1:{s:26:"wp_split_shared_term_batch";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:2:{s:8:"schedule";b:0;s:4:"args";a:0:{}}}}i:1481410113;a:1:{s:24:"wsd_cleanup_live_traffic";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:6:"hourly";s:4:"args";a:0:{}s:8:"interval";i:3600;}}}i:1481410120;a:1:{s:24:"akismet_scheduled_delete";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}i:1481436681;a:1:{s:21:"update_network_counts";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}}i:1481437386;a:1:{s:16:"itsec_purge_logs";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}i:1481441492;a:3:{s:16:"wp_version_check";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}s:17:"wp_update_plugins";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}s:16:"wp_update_themes";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}}i:1481457064;a:1:{s:30:"wp_scheduled_auto_draft_delete";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}i:1481484695;a:1:{s:19:"wp_scheduled_delete";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}i:1481488734;a:1:{s:14:"snitch_cleanup";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}s:7:"version";i:2;}`

    Your Query returns:

    SQL result
    
    Host: dbvm
    Database: vm_www_2axels-company
    Generation Time: Dec 10, 2016 at 10:30 PM
    Generated by: phpMyAdmin 4.2.2 / MySQL 0.0.00-0+xxxunn
    SQL query: SELECT tt.term_id, t.*, count(*) as term_tt_count FROM 2wp_term_taxonomy tt LEFT JOIN 2wp_terms t ON t.term_id = tt.term_id GROUP BY t.term_id HAVING term_tt_count > 1 Limit 1;
    Rows: 1
    Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.
    term_id 	term_id 	name 	slug 	term_group 	term_tt_count
    3 	3 	More own Sites 	more-own-sites 	0 	3

    Also i do your Query without the Limit Clause and got the following result:

    SQL result
    
    Host: dbvm
    Database: vm_www_2axels-company
    Generation Time: Dec 10, 2016 at 10:25 PM
    Generated by: phpMyAdmin 4.2.2 / MySQL 0.0.00-0+xxxunn
    SQL query: SELECT tt.term_id, t.*, count(*) as term_tt_count FROM 2ac_term_taxonomy tt LEFT JOIN 2ac_terms t ON t.term_id = tt.term_id GROUP BY t.term_id HAVING term_tt_count > 1 LIMIT 0, 25 ;
    Rows: 10
    Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.
    term_id 	term_id 	name 	slug 	term_group 	term_tt_count
    3 	3 	More own Sites 	more-own-sites 	0 	3
    4 	4 	Linux 	linux 	0 	2
    5 	5 	Bash 	bash 	0 	2
    9 	9 	JDBC-Driver 	jdbc-driver 	0 	2
    10 	10 	Oracle 	oracle 	0 	2
    13 	13 	Thunderbird 	thunderbird 	0 	2
    14 	14 	Development 	development 	0 	2
    16 	16 	Ubuntu 	ubuntu 	0 	2
    17 	17 	Eclipse 	eclipse 	0 	2
    37 	37 	SmartCard 	smartcard 	0 	2

    I hope you could read this, because i couldn’t check the result,
    after putting the text here in this answer field.
    If not, please contact me again.

    I think over all this is not necessarily a problem with the actual 4.7 Release from wordpress.

    Kind regards
    Axel

    Thread Starter blaufotograph

    (@blaufotograph)

    Hi Pascal,

    i don’t would push you too much, but i would like to ask you, wether you maybe are able to find some time to have a look at this issue?

    Could i help you ?

    Thank you very much, and i wish a relaxing christmas time.
    Kind regards,
    Axel

    Interesting …
    Sounds like I meet a similar duplicate entry error …

    [10-Jan-2017 11:43:27 UTC] Erreur de la base de données WordPress Duplicate entry 'cron' for key 'option_name' pour la requête INSERT INTOwp_options(option_name,option_value,autoload) VALUES ('cron', 'a:2:{i:1484048607;a:1:{s:16:\"wp_update_themes\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}s:7:\"version\";i:2;}', 'yes') ON DUPLICATE KEY UPDATEoption_name= VALUES(option_name),option_value= VALUES(option_value),autoload= VALUES(autoload) faite par 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, call_user_func_array, wp_schedule_update_checks, wp_schedule_event, _set_cron_array, update_option, add_option

    Thread Starter blaufotograph

    (@blaufotograph)

    @pento, @swissspidy,

    may i ask you again, while you could catch some time to have a view again on this issue? What may i do to help to solve this issue?
    Do you need more information about this?
    kind regards,
    axel

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp-cron.php?doing_wp_cron – results in a Database “Duplicate entry”’ is closed to new replies.