Plugin causes a Dat...
 
Notifications
Clear all

Plugin causes a Database Lock

31 Posts
3 Users
0 Likes
452 Views
Posts: 15
Topic starter
(@integritive)
Active Member
Joined: 2 months ago

Trying to integrate this plugin on a large and active WordPress install -- My client has purchased about 5 or 6 of the addons and it seems as if whenever they install or activate one the DB and therefor site goes into a tailspin caused by a database lock on queries like this:

DELETE FROM wp_options WHERE `option_name` LIKE '%_wpforo_get_phrases_%'

Which appears to be the product of a 'clear_cache' function..  I had disabled caching in the Board settings -- but still this happened even in our initial install.  Can someone shed some light on the purpose of this function and why it might backup the DB with the same query? and also how to possibly prevent it?  This isn't server specific as it has happened on 2 different servers and I have seem a smattering of other reports about it online.

 

30 Replies
Posts: 15
Topic starter
(@integritive)
Active Member
Joined: 2 months ago

More error info:

21/02/2024 02:29:36[20-Feb-2024 21:29:36] WARNING:  child 1381228 said into stderr: "NOTICE: PHP message: WordPress database error Lock wait timeout exceeded; try restarting transaction for query DELETE FROM wp_options WHERE `option_name` LIKE '%_wpforo_get_phrases_%' made by 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, wpforo\wpforo->init, do_action('wpforo_core_inited'), WP_Hook->do_action, WP_Hook->apply_filters, {closure}, wpforopoll_activation, wpforopoll_install_phrases, wpforo\classes\Phrases->add, wpforo\classes\Phrases->clear_cache"

Reply
2 Replies
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4318

@integritive

This issue doesn't have any relation to the wpForo plugin. Developers observed a decrease in MySQL execution time. Additionally, there is a plugin that changes the default WordPress transaction via the hooks. So you should find a problem outside of the wpForo plugin.

Currently, we offer PRO support services, where our developers can investigate and resolve this issue for you. For more information, please visit: https://wpforo.com/pro-support/#customization

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@sofy this was the expected answer... but I do not agree -- this ONLY happens when WPForo is activated and specifically when activating one of the PURCHASED add ons..  So I do think that is is related to WPForo..  If you have any other thoughts or can point me to someone who might then that is appreciated, otherwise it is a shame that we will not be able to use your plugin b/c of this issue.

Reply
dimalifragis
Posts: 2593
(@dimalifragis)
Famed Member
Joined: 4 years ago

A lot of Wordpress sites use wpForo along with multiple addons. I haven't seen any reports as yours.

As @sofy said this is probably an issue (it IS a real issue, no doubt about it) with some conflict with something else.

What PHP version is that? And most important what exact DB is used?

Also it is not clear if the issue happens when you activate ANY addon or some addon? All of them? Are all addons updated with the latest version?

Is that Wordpress running many plugins? Any caching, Page or Object?

Reply
1 Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@dimalifragis  MariaDB (InnoDB tables), PHP 7.4 (although we could bump it to 8 w/o issue I think), site does have probably more than average amount of plugins, it is highly traffic'd and therefor highly cached via Redis, WP Rocket (WPForo pages exlcuded) and runs thru CloudFlare.  It seems to happen when ANY addon is activated -- if you look it at the error/query, it hangs on trying to delete options from the wp_options table..  I can run that same query directly on the DB w/o issue

Reply
dimalifragis
Posts: 2593
(@dimalifragis)
Famed Member
Joined: 4 years ago

Well, if i was the site admin, i would bet that this is a caching issue. Redis or/and Rocket plugin.

I would start by disable Redis and Rocket. And then some other plugins and see what happens.

There is no other way to debug this.

Also i notice that php 7.4 is used. This is OLD and could also MariaDB be old also?

Reply
16 Replies
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@dimalifragis with the level of traffic that site gets disabling either is not an option.. WP Rocket is just HTML caching..  it may be Object Caching, but the question would be why isn't the plugin compatible with Object Caching?  I know 7.4 is old and I can try bumping it..  DB is is latest version

Reply
dimalifragis
(@dimalifragis)
Joined: 4 years ago

Famed Member
Posts: 2593

@integritive I'm sorry but there is no other way to debug this.

Wp Rocket is page caching and you and i have no idea how exactly it can conflict with wpForo caching or whatever.

If you insist this is an addon issue, then i have no other help to offer.

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@dimalifragis I am saying this is a WPForo issue that a paying client needs help with (they have bought 6 or more of the addon's already) -- also, it has happened EVERY time we've enabled the plugin and activated the add ons -- without fail. Otherwise the site runs fantastic. I will put the plugin on a standalone site by itself with no caching or additional plugins and if it happens then we can either expect support or the client being issued a refund for the add ons.

Reply
dimalifragis
(@dimalifragis)
Joined: 4 years ago

Famed Member
Posts: 2593

@integritive Again, this is NOT a wpForo or wpForo addons issue. It is something else and you refuse to debug this and insist on your original thinking.

Sorry but i can't offer any other ideas.

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@dimalifragis it is a WPForo issue b/c it happens when your plugin and add ons are activated and no other time. In fact it has never happened another time in my 5 plus years working on this site. I'm not refusing to debug, I said I will try it on a fresh install, but what is disappointing is (and this happens with 99.9% of developers) is the immediate conclusion that 'its not our problem it's yours..'  and I have seen other posts regarding DB deadlocks with this plugin, sadly with no response to them...

Reply
dimalifragis
(@dimalifragis)
Joined: 4 years ago

Famed Member
Posts: 2593

@integritive If it was as you say, others will have already reported it.

Anyways, if anyone else can help, i don't have anything else to offer here.

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@dimalifragis and again. and this was you with the EXACT error I provied you https://wpforo.com/community/general-forums-bug-reports/wordpress-database-error-deadlock/

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4318

Dear @integritive,

To resolve the issue, please reach out to your hosting support and provide them with the error message you encountered. Request an increase in the max_execution_time. This adjustment should address the issue. 

If the problem persists after these changes, just contact us again.

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@sofy max execution time has already been increased when we initially encountered the issue -- it is 2 minutes already..  given that others have encountered this issue at some point and I have encountered it on 2 different servers, seem like someone should look into the code/query, etc.

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4318

@integritive

Could you please inform us if you've increased the max_execution_time for PHP or MYSQL?

Additionally, please send the admin login details with your forum URL to info[at]gvectors.com email address. I'll ask the developers to check the issue for you. 

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@sofy it was increased in PHP -- are you suggesting that for MYSQL as well?

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4318

@integritive 

Sure, you should increase it. 

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@sofy wouldn't it be the opposite?  if you look at the process list when this is happening, it is FULL of this query.. and I mean full

DELETE FROM wp_options WHERE `option_name` LIKE '%_wpforo_get_phrases_%'

This is what is hanging it up..  shortening it would hopefully make the query just die in a reasonable amount of time.  Why is that query hanging is the question here.

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4318

@integritive 

Kindly follow the recommendation I've provided and inform us if the issue persists.

Reply
dimalifragis
Posts: 2593
(@dimalifragis)
Famed Member
Joined: 4 years ago

What are we talking about here? A script that takes 2 minutes to complete?

Default of 30 seconds and in some cases (for a limited time) 60 seconds in case of some heavy task (importing for example), are enough.

You are looking at the wrong direction. This is not a proper way to debug this.

Reply
4 Replies
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15

@dimalifragis you'll need to note that was suggested TO ME and not BY ME..   I'm curious as to why you refuse to review the code in question given that this issue with specific error messages has been reported multiple times -- we are talking about a pay customer here.

Reply
dimalifragis
(@dimalifragis)
Joined: 4 years ago

Famed Member
Posts: 2593

@integritive I can't review anything, i'm just a user here. Nothing else. Not affiliated with gvectors in anyway. Sorry if i gave that impression to you.

Who else has reported a similar error as yours (as you say)?

Reply
(@integritive)
Joined: 2 months ago

Active Member
Posts: 15
dimalifragis
(@dimalifragis)
Joined: 4 years ago

Famed Member
Posts: 2593

@integritive This is funny since i was one of them 🙂 I didn't even remember that.

And i don't run any addons ....

But i run a LOT of plugins and magically the issue went away, i only saw it once.

Reply
Page 1 / 2