failed to acquire exclusive database access
Brought to you by:
jberanek
Hello ~ I recently updated to the lastest version 1.6.1 from version 1.4.10. Followed the update instructions and the database updated upon first access successfully. I updated due to users getting an error "This page isn’t working my.site.here is currently unable to handle this request. HTTP ERROR 500. That error went away but now they get the following error "failed to acquire exclusive database access". Sometimes it works but mostly they get that error. If I restart mysql and apache it works again. I attempting to get new logs but of course now its working while testing. Once I get new logs I'll post but if anyone has any insight on how to resolve this I'd be greatful and so would my users.
Which database (MySQL or PostgreSQL) are you using and which version?
MySQL Ver 14.14 Distrib 5.7.19
Last edit: TechGuy96 2017-09-29
Well I added
to my config file and restarted apache2 and MySQL and it has kept working for about 30 test reservations in a row. Going to keep hammering it to see if I either fixed it or its still broken. It has done this before. We prevent outside access forcing users to login right away with the following code:
@Campbell Morrison Does it matter where the code is placed in the config file?
I moved it from the top of the config file to the bottom and now after about 60 test it continues to work. So maybe its fixed now? Will continue to hammer away at it but it seems solid now. If that is so I can update my other 4 school building sites so they no longer get the 500 error.
Thanks!
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
Yes, it can go anywhere, though I don't understand why that line should make a difference.
Campbell
Nope still getting the error. Can you assist with resolving this "failed to acquire exclusive database access" error. Thanks!
What is $db_persist set to?
Oh maybe that is it, its currently commented out. Should I uncomment that? By default it is set to 1. Thanks!
I umcommented it and still same issue. Can you give me any other help on this issue as it affected lots of users. Thanks!
Last edit: TechGuy96 2017-10-09
I am attaching a version of lib/MRBS/DB_mysql.php which gives more error information when a lock can't be obtained. Can you use this version of the file please and let us know what error is given when exclusive access can't be obtained? The error messages will appear in your PHP error log.
I have also committed these changes to the default branch in 2db57f.
Here's another version of lib/MRBS/DB_mysql.php with yet more diagnostics in it.
I have also committed these changes to the default branch in 6c4733.
Ok so that last version is now installed. Now to wait to get the error. I tried about 30 times and did not get a single error. So now the waiting game. It was pretty bad a few days ago.