• On several sites, I’m getting this type of error every few days. Here’s an example:

    [13-Dec-2023 06:55:07 UTC] WordPress database error Duplicate entry ‘103.186.185.82-2023-12-12 00:00:00’ for key ‘ip__time’ for query INSERT INTO iaklmbr0f_itsec_dashboard_lockouts (ip, time, count) VALUES (‘103.186.185.82’, ‘2023-12-12’, 1),(‘142.4.12.109’, ‘2023-12-12’, 1),(‘144.217.181.137’, ‘2023-12-13’, 1),(‘148.66.146.6’, ‘2023-12-12’, 1),(‘148.72.208.193’, ‘2023-12-12’, 1),(‘162.144.100.77’, ‘2023-12-12’, 1),(‘162.19.230.241’, ‘2023-12-12’, 1),(‘167.172.66.189’, ‘2023-12-12’, 1),(‘170.64.208.1’, ‘2023-12-12’, 1),(‘184.168.96.123’, ‘2023-12-12’, 1),(‘198.71.240.28’, ‘2023-12-12’, 1),(‘2001:41d0:700:2454::’, ‘2023-12-13’, 1),(‘208.109.71.255’, ‘2023-12-12’, 1),(‘208.109.71.255’, ‘2023-12-13’, 1),(‘211.226.150.72’, ‘2023-12-12’, 1),(‘216.39.248.94’, ‘2023-12-13’, 1),(‘2400:6180:0:d1::66d:b001’, ‘2023-12-12’, 1),(‘2604:a880:2:d0::68d:e001’, ‘2023-12-12’, 1),(‘2a0b:7280:100:0:447:56ff:fe00:207b’, ‘2023-12-12’, 1),(‘34.148.255.185’, ‘2023-12-13’, 1),(‘39.98.222.165’, ‘2023-12-12’, 1),(‘50.62.177.48’, ‘2023-12-12’, 1),(‘54.39.49.20’, ‘2023-12-12’, 1),(‘61.160.215.149’, ‘2023-12-12’, 1),(‘68.178.145.194’, ‘2023-12-12’, 1),(‘68.178.148.52’, ‘2023-12-13’, 1),(‘68.178.149.3’, ‘2023-12-13’, 1),(‘72.167.67.76’, ‘2023-12-13’, 1),(‘87.98.171.138’, ‘2023-12-12’, 1),(‘92.205.10.134’, ‘2023-12-12’, 1),(‘92.205.145.153’, ‘2023-12-12’, 1),(‘92.205.19.74’, ‘2023-12-13’, 1); made by do_action_ref_array(‘itsec_cron’), WP_Hook->do_action, WP_Hook->apply_filters, ITSEC_Scheduler_Cron->process, ITSEC_Scheduler_Cron->run_recurring_event, ITSEC_Scheduler->call_action, do_action(‘itsec_scheduled_purge-lockouts’), WP_Hook->do_action, WP_Hook->apply_filters, ITSEC_Lockout->purge_lockouts, ITSEC_Lockout->record_lockout_summary

    All those sites run wp_cron.php from the operating system every 15 minutes, if this makes a difference, all are cached and all run on Litespeed web servers.

    • This topic was modified 10 months, 3 weeks ago by Gal Baras.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Support Ben Meredith

    (@benmeredithgmailcom)

    Hey @galbaras!

    Glad you reached out, here. That has to be caching causing that, i’d assume. The error is saying that two lockouts are happening at the exact same second, for the exact same IP address. That’s highly unlikely to happen (though not impossible). But the fact that it lists the time as exactly midnight 00:00:00 makes it even more likely in my mind that this is somehow caching-related.

    I’m reaching out internally to our team to see if there’s a way to exclude that query from cache or something. I’ll follow up.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @galbaras, we received feedback from our lead developer regarding this error. They think the issue seems like the consolidation process is running multiple times concurrently and could be related to your cron/scheduling setup.

    To give you a bit of insight, that table is not exactly a real time table. It’s a reporting table where we first record events over a 24-hour period and then consolidate them into a single entry per day for more efficient storage.

    It was also noted that running cron every 15 minutes is not as often as expected, so it might also be worth looking into increasing the frequency. We recommend checking with your host on this matter to make sure the frequency aligns with your server resources, the site’s needs, and the impact on site performance.

    I hope this helped shed some light on the error. Let us know if you have other questions.

    Thread Starter Gal Baras

    (@galbaras)

    Tunning cron infrequently wouldn’t be a good reason for too many things running at the same time. If anything, tasks might be skipped or late.

    Your lead developer may want to implement a semaphor to prevent multiple parallel runs. Or maybe check the input before writing to the database?

    More importantly, the duplicate entry has no time value, which the existing/conflicting one always has the time ’00:00:00′. Could this point to the issue? After all, in PHP, this time might evaluate to false somewhere in the code.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @galbaras, I wanted to inform you that I’ve passed along your suggestion on implementing a semaphor. I don’t have a confirmation yet, but we’re going to need the following information.

    Enable the Solid Security Debug module using this guide and send the ff:

    • What scheduler is being used on the sites?
    • What is the value of the last_seen_lockout setting in the core module?

    As for the duplicate entry having no time value, our developer confirmed that it is just MySQL normalizing the time to 00:00:00. Can you check if lockouts are being cleared from the itsec_lockouts table?

    Thread Starter Gal Baras

    (@galbaras)

    The scheduler is the CloudLinux cron.

    last_seen_lockout is set to 1705647302.

    The oldest row in the itsec_lockouts table is from 9 days ago, and there are 208 in total, covering all the days in-between then and today.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @galbaras, thanks for sending the information.

    We’re looking for the?Scheduler value?on the Debug page for the first item, which should be either ITSEC_Scheduler_Page_Load or ITSEC_Scheduler_Cron.?

    Can you let me know what is reflected there?

    Thread Starter Gal Baras

    (@galbaras)

    My page looks somewhat different than yours, but still, it shows ITSEC_Scheduler_Cron.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @galbaras, I don’t have a significant update for this duplicate entry DB error yet. Still, I wanted to inform you that we’ve released a fix for?this topic?on both Solid Security Basic v9.3.0 and Pro v8.3.0: Bug Fix: Truncate log item columns that are too long before inserting into the database.

    I’ll get back to you once I have news on this issue. Thank you for being so patient!

    Thread Starter Gal Baras

    (@galbaras)

    Yeah, I saw that and my heart skipped a beat ??

    Honestly, this should be resolved at WP core level, but taking care of your plugin’s messages is greatly appreciated.

    I will await resolution of the lockout table issue with the hope it won’t take as long as that other one ??

    Thread Starter Gal Baras

    (@galbaras)

    Any news?

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @galbaras, thanks for getting back! I was away for a bit and just got back.

    I am still waiting to hear from our team regarding your issue. I’ll do my best to bump up the internal ticket again for visibility, and I’ll get back to you as soon as I have an update.

    I appreciate your patience!

    Thread Starter Gal Baras

    (@galbaras)

    Another month bites the dust…

    Plugin Support Ben Meredith

    (@benmeredithgmailcom)

    Hey @galbaras!

    Out of curiosity, where are you seeing the error here? Is it displayed somewhere, or in a log, or what?

    We have (so far) 2 reports of this error message, but I want to be clear: it’s not really an error, it’s WordPress essentially saying “hey we stopped you from adding a duplicate entry” which is ultimately a good thing.

    If this issue were widespread, we’d be covered in tickets and forum posts at this point. So yes, another month has gone by that we haven’t fixed it, but really only because we have yet to reproduce the error on any of our test sites, and without reproducing it, we’re essentially guessing on the reason for the root problem.

    So the short term fix is to ignore the warning (and rest easy in the fact that Solid Security is still locking out bad actors, as intended) and the long term fix is for us to have a spot to replicate the issue. We’re happy to dig in.

    It hasn’t been escalated in priority because of that combination: it’s not breaking anything, and so far only 2 reports of it.

    Thread Starter Gal Baras

    (@galbaras)

    Update: this message showed up several times in the past 31 days on about half of my sites, so it’s still happening.

    Plugin Support Ben Meredith

    (@benmeredithgmailcom)

    Hey @galbaras !

    Where are you seeing that error? Just in a log? or somewhere else?

    I’m very confident this has to do with some caching not being tuned correctly somewhere, but until I can replicate the issue, we’re stuck.

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