Database error - Regular warnings

I am getting errors like the one below multiple times per day. Is this a known issue? The related duplicate entries come from different modules all the time. The only common element is that its always sys_seo_links

Query:
INSERT INTO `sys_seo_links` SET `module` = :module, `page_uri` = :page_uri, `param_name` = :param_name, `param_value` = :param_value, `uri` = :uri, `added` = :ts

Mysql error:
Duplicate entry 'bx_persons-view-persons-profile-57819' for key 'module_page_param'

Location:
The error was found in query function in the file inc/classes/BxDolPageQuery.php at line 203.

collation_connection:
utf8mb4_unicode_ci


  • 828
  • More
Replies (3)
    • I think I found the root cause. While manually running the cron jobs, sometimes they take more than 1 minute. When that happens, these errors happen. I am guessing the insert is duplicated due to the long running previous execution. Its not a CPU or memory issue - its just that whatever the cron run is doing is big enough to take more than 1 minute...

      • Self update for today - Found the cause of the slow execution. Mail outbound - was sending notifications - no problem, except 1.1.1.1 dns server was misbehaving today.

        Suggestion: Maybe a capability in the cron script so that when it runs, if it detects its been active for more than x time, to exit and let the next instance of the cron script to send the next message... Possibly nicer way to handle delays like DNS failure for outbound mail. One execution run of cron.php was taking 6m18.617s

        • Final closure on this - The problem with sys_seo_links is closed. Root cause: Mail notifications were going out to the mail server, which was "slow" due to DNS issues. That caused the script to run for 20-30+ minutes when there were many mail messages queued. Perhaps - in the context of mail outbound, it might make sense to have a "max lifetime" for cron jobs for mail sending - so that the job will stop sending mail if its more than x time, so that other non mail related jobs can finish without issues. Just a thought

          Login or Join to comment.