Menu

#1332 failed to acquire exclusive database access

open
nobody
error (1)
1
2017-10-19
2017-09-29
TechGuy96
No

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.

Discussion

  • Campbell Morrison

    Which database (MySQL or PostgreSQL) are you using and which version?

     
  • TechGuy96

    TechGuy96 - 2017-09-29

    MySQL Ver 14.14 Distrib 5.7.19

     

    Last edit: TechGuy96 2017-09-29
  • TechGuy96

    TechGuy96 - 2017-09-29

    Well I added

    $zoneinfo_expiry = PHP_INT_MAX; 
    

    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:

    $auth['deny_public_access'] = TRUE;
    
     
  • TechGuy96

    TechGuy96 - 2017-09-29

    @Campbell Morrison Does it matter where the code is placed in the config file?

    $zoneinfo_expiry = PHP_INT_MAX; 
    

    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!

     
  • TechGuy96

    TechGuy96 - 2017-10-02

    Nope still getting the error. Can you assist with resolving this "failed to acquire exclusive database access" error. Thanks!

     
  • Campbell Morrison

    What is $db_persist set to?

     
  • TechGuy96

    TechGuy96 - 2017-10-02

    Oh maybe that is it, its currently commented out. Should I uncomment that? By default it is set to 1. Thanks!

     
  • TechGuy96

    TechGuy96 - 2017-10-09

    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
  • Campbell Morrison

    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.

     
  • Campbell Morrison

    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.

     
  • TechGuy96

    TechGuy96 - 2017-10-19

    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.

     
MongoDB Logo MongoDB