Title: WordPress database error Lock wait timeout exceeded
Last modified: May 6, 2022

---

# WordPress database error Lock wait timeout exceeded

 *  [macbrush723](https://wordpress.org/support/users/macbrush723/)
 * (@macbrush723)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/)
 * One of our WordPress sites has developed this error, not sure how long it’s been,
   but recently the main page sometimes takes nearly a min to load, so I suspect
   this might have something to do with it. Below is some of the log, they’re all
   the same. I’ve looked into the database, there are like over 600,000 entries 
   in wppa_session table, most of them say “expired”. Any pointer to how to begin
   diagnosing this issue would be very much appreciated.
 * Thanks
    Kenneth
 * P.S. I am a network administrator, but our residence WordPress expert has recently
   left the company to immigrate overseas, so I might need somewhat more help.
 * [Fri May 06 16:09:37.022997 2022] [php7:notice] [pid 30964] [client 207.244.234.219:
   50696] WordPress database error Lock wait timeout exceeded; try restarting transaction
   for query UPDATE wp1_wppa_session\r\n\t\t\t\t\t\t SET ip = ”, user = ”, data 
   = ”\r\n\t\t\t\t\t\t WHERE status = ‘expired’\r\n\t\t\t\t\t\t AND data NOT LIKE‘%”
   isrobot”;b:1;%’ 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, wppa_session_start, referer:
   [https://gemy.link/81L8v](https://gemy.link/81L8v)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-database-error-lock-wait-timeout-exceeded-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15621244)
 * The expired entries should be removed automatically by cron process ‘wppa_cleanup’
   that runs every hour.
 * Make sure you did not disable cron processes in any way.
 * You may ‘manually’ **TRUNCATE TABLE wp1_wppa_session** at any time.
 *  Thread Starter [macbrush723](https://wordpress.org/support/users/macbrush723/)
 * (@macbrush723)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15621274)
 * Thanks for the quick reply. I have looked through Tools -> Cron Events, and couldn’t
   find anything look similar to wppa, perhaps they weren’t installed? Any way I
   could trigger wppa to reinstall cron jobs?
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15621286)
 * Just run Setup on Advanced settings -> Maintenance -> I -> Item 1, and make sure
   Item 0 is UNtcked
 *  Thread Starter [macbrush723](https://wordpress.org/support/users/macbrush723/)
 * (@macbrush723)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15621300)
 * Thank you, I’ll give it a go tonight. Better not do anything rush in production
   hour.
 * Will report back.
 *  Thread Starter [macbrush723](https://wordpress.org/support/users/macbrush723/)
 * (@macbrush723)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15621333)
 * Sorry, but one question. How do I run setup? I could only see Settings -> Do 
   a quick initial setup.
 * Thanks
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15621620)
 * Are you up to rev? 8.1.09.008 is current
 * On the **Photo Albums -> Settings** admin page: **Advanced Settings -> Maintenance-
   > I -> Item 1**: it reads: _Setup Re-initialize plugin._
    At the right hand side
   there is a `Do it!` button. Press the button.
 * This is almost equivalent to de-activate and re-activate the plugin.
 * Again: Make sure that at Item 1 on the same page: _Postpone cron_ the box is 
   UNchecked.
    -  This reply was modified 4 years ago by [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/).
 *  Thread Starter [macbrush723](https://wordpress.org/support/users/macbrush723/)
 * (@macbrush723)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15624252)
 * Thanks, we have an old version of WPPA+, probably time for an update.
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15624258)
 * The old version will also work for this, just run the quick setup, it takes a
   second or so, you can do it harmless on a production site.
    -  This reply was modified 4 years ago by [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/).

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘WordPress database error Lock wait timeout exceeded’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-photo-album-plus.svg)
 * [WP Photo Album Plus](https://wordpress.org/plugins/wp-photo-album-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-photo-album-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-photo-album-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-photo-album-plus/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/wordpress-database-error-lock-wait-timeout-exceeded-2/#post-15624258)
 * Status: not resolved