• Resolved Tomasz Dziuda

    (@dziudek)


    Hi,

    As I see your plugin causes many items in the debug.log:

    WordPress database error Commands out of sync; you can't run this command now for query INSERT  INTO #__icwp_wpsf_req_logs (created_at,req_id,ip_ref) VALUES ('1708937761','72354f373c','945240') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, FernleafSystems\Wordpress\Plugin\Shield\Controller\Controller->onWpShutdown, do_action('icwp-wpsf-plugin_shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\Lib\EventsListener->FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\Lib\{closure}, FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Lib\AuditLogger->onShutdown, AptowebDeps\Monolog\Logger->log, AptowebDeps\Monolog\Logger->addRecord, AptowebDeps\Monolog\Handler\FilterHandler->handle, AptowebDeps\Monolog\Handler\AbstractProcessingHandler->handle, FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Lib\LogHandlers\LocalDbWriter->write, FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Lib\LogHandlers\LocalDbWriter->createPrimaryLogRecord, FernleafSystems\Wordpress\Plugin\Shield\Modules\Data\DB\ReqLogs\RequestRecords->loadReq, FernleafSystems\Wordpress\Plugin\Shield\Modules\Data\DB\ReqLogs\RequestRecords->addReq, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Insert->insert, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\BaseQuery->query, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Insert->execQuerySql, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\BaseQuery->execQuerySql, FernleafSystems\Wordpress\Services\Core\Db->doSql

    And also:

    WordPress database error Commands out of sync; you can't run this command now for query INSERT  INTO #__icwp_wpsf_event (created_at,event,count) VALUES ('1708937761','conn_kill_crowdsec','1') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, FernleafSystems\Wordpress\Plugin\Shield\Controller\Controller->onWpShutdown, do_action('icwp-wpsf-plugin_shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\Lib\EventsListener->FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\Lib\{closure}, FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\Lib\StatsWriter->onShutdown, FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\DB\Event\Ops\Handler->commitEvents, FernleafSystems\Wordpress\Plugin\Shield\Modules\Events\DB\Event\Ops\Handler->commitEvent, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Insert->insert, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\BaseQuery->query, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Insert->execQuerySql, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\BaseQuery->execQuerySql, FernleafSystems\Wordpress\Services\Core\Db->doSql

    It is all after upgrade from PHP 8.0 to 8.2. Earlier we get below error, but after upgrade it disappeared:

    WordPress database error Cannot add or update a child row: a foreign key constraint fails (###.#__icwp_wpsf_botsignal, CONSTRAINT #__icwp_wpsf_botsignal_ibfk_1 FOREIGN KEY (ip_ref) REFERENCES #__icwp_wpsf_ips (id) ON DELETE CASCADE ON UPDATE CASCADE) for query INSERT  INTO #__icwp_wpsf_botsignal (created_at,updated_at,notbot_at,frontpage_at,loginpage_at,bt404_at,btfake_at,btcheese_at,btloginfail_at,btua_at,btxml_at,btlogininvalid_at,btinvalidscript_at,btauthorfishing_at,cooldown_at,humanspam_at,markspam_at,unmarkspam_at,captchapass_at,captchafail_at,auth_at,firewall_at,ratelimit_at,offense_at,blocked_at,unblocked_at,bypass_at,snsent_at) VALUES ('1708722462','1708722462','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0') made by require('wp-blog-header.php'), 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, icwp_wpsf_init, require_once('/plugins/wp-simple-firewall/plugin_init.php'), ICWP_WPSF_Shield_Security->start, FernleafSystems\Wordpress\Plugin\Shield\Controller\Controller->boot, FernleafSystems\Wordpress\Plugin\Shield\Rules\RulesController->processRules, FernleafSystems\Wordpress\Plugin\Shield\Rules\RulesController->processRule, FernleafSystems\Wordpress\Plugin\Shield\Rules\Processors\ProcessConditions->process, FernleafSystems\Wordpress\Plugin\Shield\Rules\Processors\ProcessConditions->processSingleCondition, FernleafSystems\Wordpress\Plugin\Shield\Rules\Conditions\Base->run, FernleafSystems\Wordpress\Plugin\Shield\Rules\Processors\ProcessConditions->process, FernleafSystems\Wordpress\Plugin\Shield\Rules\Conditions\Base->FernleafSystems\Wordpress\Plugin\Shield\Rules\Conditions\{closure}, FernleafSystems\Wordpress\Plugin\Shield\Rules\Conditions\IsIpHighReputation->execConditionCheck, FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Lib\IsHighReputationIP->query, FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Lib\Bots\Calculator\CalculateVisitorBotScores->total, FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Lib\Bots\Calculator\CalculateVisitorBotScores->scores, FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Lib\Bots\Calculator\CalculateVisitorBotScores->loadRecord, FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Lib\Bots\BotSignalsRecord->retrieve, FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Lib\Bots\BotSignalsRecord->store, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Insert->insert, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\BaseQuery->query, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Insert->execQuerySql, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\BaseQuery->execQuerySql, FernleafSystems\Wordpress\Services\Core\Db->doSql
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Paul

    (@paultgoodchild)

    Hi Tomasz,

    Regarding the first 2 errors:

    This issue can happen on some sites, and the summary cause is outlined in our response here: https://wordpress.org/support/topic/plugin-is-causing-regular-database-errors/

    Shield is attempting a query, but the systems can’t handle it because the database isn’t ready, or isn’t in a state to accept the query. There’s nothing wrong with the query itself, just that the MySQL server is reporting that it can’t be run.

    A potential cause of this is high-traffic and overloaded hosting, where simultaneous requests are performing SQL queries and 1 of the requests can’t make the necessary queries because a separate request in “working” on the DB.

    The 3rd query error is completely separate. Is this error repeating a lot, or intermittently at random?

    Thread Starter Tomasz Dziuda

    (@dziudek)

    Hi Paul,

    Ok, the first 2 errors are something critical? It can cause issues for the users of the website?

    Regarding third problem – it appeared around 20 times in 3 days before migration from PHP 8.0 to PHP 8.2 – I do not have earlier logs.

    Plugin Author Paul

    (@paultgoodchild)

    From those errors, no, they wouldn’t affect users. My guess is that they’re quite rare. I would consider perhaps increasing your MySQL processing capacity and see if this alleviates the issue at all for you.

    So do you mean it’s appeared 20 times and then stopped showing up? Around this mysql error, are there any other associated PHP errors? I believe we could maybe mitigate this error, but I actually think this might be related to performance limitations of the MySQL server, but it’s hard to say – I’m reviewing the code.

    Thread Starter Tomasz Dziuda

    (@dziudek)

    These errors stop appear after upgrade from PHP 8.0 to 8.2 – I have only logs from the last 7 days. And PHP upgrade has been done ~4 days ago.

    I suppose that PHP upgrade “solved” this issue

    Plugin Author Paul

    (@paultgoodchild)

    Okay, we’ll can you keep an eye out for it again and pass along any associated php errors. For that lady error, we’ll see if we can mitigate it in the code

    Thread Starter Tomasz Dziuda

    (@dziudek)

    Hi,

    The third problem re-appeared today – unfortunately there are no associated PHP errors – it is the only warning which appeared today


    WordPress database error Cannot add or update a child row: a foreign key constraint fails...

    So I suppose that it is not related to the PHP 8.0/8.2 upgrade

    Plugin Author Paul

    (@paultgoodchild)

    Thanks for letting us know! We’ll see if we can mitigate this for a future release – it won’t cause any issues for your normal site visitors.

    Thread Starter Tomasz Dziuda

    (@dziudek)

    Ok, I will try to report this issue to the hosting company – maybe it is an issue with MySQL instance which needs additional actions

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Errors in debug.log’ is closed to new replies.