[MY-012985] [InnoDB] A long semaphore wait
suggests a potential database lock or resource contention issue.Error message from server logs
With Modsecurity enabled, on my wordpress health screen I am getting the following errors that should be improved:
Unable to detect the presence of page cache
Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: cURL error 56: OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0 (Code: http_request_failed)
Page cache enhances the speed and performance of your site by saving and serving static pages instead of calling for a page every time a user visits.
Page cache is detected by looking for an active page cache plugin as well as making three requests to the homepage and looking for one or more of the following HTTP client caching response headers:
cache-control
,expires
,age
,last-modified
,etag
,x-cache-enabled
,x-cache-disabled
,x-srcache-store-status
,x-srcache-fetch-status.
With Modsecurity disabled, I get no such errors.
Can someone please help me figure out how to fix this?
]]>2024-08-09 12:45:26 88090 [ERROR] Incorrect definition of table mysql.column_stats: expected column ‘hist_type’ at position 9 to have type enum(‘SINGLE_PREC_HB’,’DOUBLE_PREC_HB’,’JSON_HB’), found type enum(‘SINGLE_PREC_HB’,’DOUBLE_PREC_HB’).
2024-08-09 12:45:26 88090 [ERROR] Incorrect definition of table mysql.column_stats: expected column ‘histogram’ at position 10 to have type longblob, found type varbinary(255).
2024-08-09 12:45:26 88090 [ERROR] Incorrect definition of table mysql.column_stats: expected column ‘hist_type’ at position 9 to have type enum(‘SINGLE_PREC_HB’,’DOUBLE_PREC_HB’,’JSON_HB’), found type enum(‘SINGLE_PREC_HB’,’DOUBLE_PREC_HB’).
2024-08-09 12:45:26 88090 [ERROR] Incorrect definition of table mysql.column_stats: expected column ‘histogram’ at position 10 to have type longblob, found type varbinary(255).
This happens on multiple websites with multiple themes, all running 6.6.1, which makes it feel like a WordPress bug. How do we fix it?
(Edited later) Forgot to add versions. Hosted on a Fedora 40 VM with mariadb-server-10.11.8-3.fc40.x86_64
thanks
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE group_id IN (1) AND is_confirmed = 1 AND (is_admin = 0 AND is_mod = 0 A…’ at line 1 for query SELECT user_id FROM WHERE group_id IN (1) AND is_confirmed = 1 AND (is_admin = 0 AND is_mod = 0 AND is_banned = 0) ORDER BY date_modified DESC made by 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, bbp_init, do_action(‘bbp_init’), WP_Hook->do_action, WP_Hook->apply_filters, bbp_register, do_action(‘bbp_register’), WP_Hook->do_action, WP_Hook->apply_filters, bbp_register_post_types, do_action(‘bbp_register_post_types’), WP_Hook->do_action, WP_Hook->apply_filters, bbPress::register_post_types, current_user_can, user_can, WP_User->has_cap, apply_filters(‘user_has_cap’), WP_Hook->apply_filters, Zqe\Genealogical_Tree_Admin->bp_manage_capabilities, groups_get_group_members, BP_User_Query->__construct, BP_User_Query->prepare_user_ids_query, BP_Group_Member_Query->get_include_ids, BP_Group_Member_Query->get_group_member_ids
]]>My personal web site, https://benpaley.com/, is down with “Error reconnecting to database” — I’ve enabled debugging in wp-config.php
but it’s still not very informative. I get the same error from /wp-admin
I can log in to MariaDB perfectly well on the command line using credentials copied from wp-config.php
, so there’s nothing wrong there.
Another site on the same server, https://starcreativeheritage.org/, is working perfectly, which also suppports the notion that it isn’t the server per se that’s the problem.
Both sites are at WordPress version 6.5.3.
Both sites connect using localhost
.
As for the server:
MariaDB says Server version: 10.5.23-MariaDB-0+deb11u1 Debian 11
PHP version is 8.3
I tried disabling plugins using wp cli, but I got the same database error.
I renamed all the plugin folders, but I still got the same error.
I defined WP_ALLOW_REPAIR as true in wp-config.php
and requested wp-admin/maint/repair.php
in a browser, but I got the same error.
I changed DB_HOST to 127.0.0.1
but it didn’t help.
I was getting “Deprecated” warnings concerning wp-content/object-cache.php
so I renamed that and commented out lines relating to WP_CACHE and WPCACHEHOME in wp-config.php
, but of course I’m still getting the same error.
I have made some changes to the site recently — some time last week I spent a bit of time playing with various sorts of caching — but when I stopped playing, the site was working, and I’ve definitely looked at it and seen it working since, so I don’t know whether or not the caching changes I made might be involved.
I am bewildered. I would really appreciate any ideas on new avenues to explore. I feel like there must be some sort of plugin issue, since the other site is working fine, and what else would the difference be? Then again, renaming all the plugin folders didn’t solve the issue, so maybe it isn’t anything to do with plugins.
Thanks,
Ben
How can I find out which database is the current one used by the main domain please?
]]>Bottom line: When we run 2.5.0 or below, everything works nicely. If we install 2.5.1, our sites go down. From what I can see, this only seems to happen in our production environment, where we are running MariaDB (10.5.24) Galera (three master-master nodes) behind an HAProxy load-balancer that sends read and write requests in a round-robin format. (In staging, we have a single MariaDB server, running locally—also v10.5.24.) The moment we enable 2.5.1 on any of our sites, we get a spike in slow queries. If we roll back the plugin to 2.5.0 or below, this immediately stops. I don’t know enough about the architecture of the plugin to work out why. Any ideas?
Thanks! Any help is much appreciated.
]]>I set up the local folder to contain WordPress files then created the virtual host in WAMPServer and set up the database using PHP MyAdmin. When setting up the database, I made sure to select “MariaDB rather than MySQL. After doing these steps, I went back to WAMP, selected Your virtualhosts –>easylivinghomeservices.test and started the WP install.
I get the following error:
Cannot select database The database server could be connected to (which means your username and password is okay) but the?database could not be selected.
I used the username “root” with no password as I have done in the past. The message indicates that doing this is not the issue.
I can log into the database through PHP MyAdmin, There isn’t anything there because the WP install won’t run. Last time I set up a local WP site, WordPress populated the database as part of the install process. Is the process different when using MariaDB? I have never used MariaDB before but couldn’t find any information on using it as my database when installing WordPress.
Again, I made sure to select MariaDB when I added the database in PHP MyAdmin.
I have set up local sites many times without a problem. I have always used MySQL for the database but am using MariaDB for this site as this is the database that is used by the hosting company. (I don’t want to run into issues because I used MySQL locally and will have to use MariaDB when the site goes live.)
Is the cause of my problem the fact I used PHP MyAdmin instead of something else?
]]>I’m running WordPress on Docker. This has suddenly occurred.
I’ve tried define('WP_ALLOW_REPAIR', true);
which didn’t sort the problem.
Logs:
Bad magic header in tc log
2024-02-07 22:39:57 0 [ERROR] Crash recovery failed. Either correct the problem (if it’s, for example, out of memory error) and restart, or delete tc log and start server with –tc-heuristic-recover={commit|rollback}
I have no idea how to go from here.
Help please!
TIA
John
]]>