• Resolved kutalia

    (@kutalia)


    Today I updated WordPress to version 5.4. And after that (if I am not mistaken) I also updated Longer Permalinks plugin to the latest version (1.21). Then I looked into debug.log file and saw lots of errors like this:

    [13-Apr-2020 16:52:11 UTC] PHP Warning:  mysqli_query(): (42000/3057): Incorrect user-level lock name 'my_table_name_wordpress_longer_permalinks_backup_existing_postnames'. in physical_path_to_website/wp-includes/wp-db.php on line 2024
    [13-Apr-2020 16:52:11 UTC] WordPress database error Incorrect user-level lock name 'my_table_name_longer_permalinks_backup_existing_postnames'. for query SELECT GET_LOCK('my_table_name_longer_permalinks_backup_existing_postnames',0) made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/longer-permalinks/longer-permalinks.php'), longer_permalinks_backup_existing_postnames
    [13-Apr-2020 16:52:11 UTC] Longer Permalinks - could not acquire LOCK for longer permalinks backup.

    where “my_table_name” and “physical_path_to_website” describe WordPress table name and the website path respectively. I am not showing them for security reasons.
    I think the problem is the length of the lock name – my_table_name_longer_permalinks_backup_existing_postnames is (in real life) 66 characters long whereas lock name limit in MySQL 5.7 is only 64.
    Currently posts with long permalinks are broken, the plugin is trying to access backup but can not. What should I do? I don’t think it’s very good idea to downgrade MySQL or tweak tables by hand. Even if that fixes my problem others might encounter it. The problem is with the lock system which should check if it’s name exceeds 64 characters.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author antithesisgr

    (@antithesisgr)

    Hello,
    thank you for your detailed message.

    Indeed it is as you say: The 64 chars limit on lock names.
    Actually other MySQL versions (even 5.6) allows more than 64 characters on lock names.

    This is very easy to fix on our side (we will make the lock name shorter).

    We will release a new version of the plugin with the fix the soonest possible.

    Thank you very much again.

    • This reply was modified 4 years, 11 months ago by antithesisgr.
    • This reply was modified 4 years, 11 months ago by antithesisgr.
    • This reply was modified 4 years, 11 months ago by antithesisgr.
    Plugin Author antithesisgr

    (@antithesisgr)

    Dear @kutalia,
    can you please try the latest version released today (ver 1.22), it should be OK now with the length of the lock name?
    Is it OK now?

    Thank you.

    Dear antithesisgr, can you please try the latest version released today

    Plugin Author antithesisgr

    (@antithesisgr)

    Hello @yousrialgharawy,

    you wrote in a support thread opened by some other user for a specific problem.
    If you are experiencing a similar problem (or any problem), please open a new support request instead.

    Thank you.

    Thread Starter kutalia

    (@kutalia)

    @antithesisgr Hello again. Sorry for the late response, I’ve been busy.
    I updated the plugin to version 1.22 and it’s been working seamlessly. But keep in mind I have had already fixed the bug via manual database manipulations beforehand.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘“Incorrect user-level lock name” error when trying to acquire LOCK for backups’ is closed to new replies.