Title: PHP message: Deadlock found
Last modified: November 12, 2018

---

# PHP message: Deadlock found

 *  [CharleyBoy](https://wordpress.org/support/users/charleyboy/)
 * (@charleyboy)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/)
 * Hi,
    I have been having a lot of error messages lately in my logs. Every few 
   hour, I also get some 500.
 * In my log file, I see lines like this one:
    `$starting transaction for request
   INSERT IGNORE INTO`wp_wfConfig`(`name`,`val`,`autoload`) VALUES (‘wfSyncGeoIP.
   lock’, ‘1541969***’, ‘no’) made by require(‘wp-blog-h$ 2018/11/11 17:03:06 [error]
   975#975: *1237071 FastCGI sent in stderr: “PHP message: Database error WordPress
   Deadlock found when trying to get lock; try restarting transaction for request
   INSERT IGNORE INTO `wp_wfConfig` (`name`, `val`, `autoload`) VALUES (‘wfSyncGeoIP.
   lock’, ‘1541973***’, ‘no’) made by require(‘wp-blog-header.php’), require_once(‘
   wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’),
   do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, wordfence::
   veryFirstAction, wfConfig::createLock” while reading response header from upstream,
   client: 66.***.***.**, server: exemple.com, request: “GET /?wordfence_lh=1&hid
   =4306778CD8ECF9CD9B890E76D1C0FD96&r=0.8929710348003269 HTTP/1.1”, upstream: “
   fastcgi://unix:/run/php/php7.0-fpm.sock:”, host: “exemple.com”, referrer: “[https://exemple.com/2018/11/11/article/&#8221](https://exemple.com/2018/11/11/article/&#8221);`
 * What is happening?
    Thanks,
    -  This topic was modified 7 years, 6 months ago by [CharleyBoy](https://wordpress.org/support/users/charleyboy/).
    -  This topic was modified 7 years, 6 months ago by [CharleyBoy](https://wordpress.org/support/users/charleyboy/).

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

 *  [wfasa](https://wordpress.org/support/users/wfasa/)
 * (@wfasa)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10876527)
 * Hi [@charleyboy](https://wordpress.org/support/users/charleyboy/),
 * Can you send me a diagnostics report from Wordfence please?
 * Navigate to Wordfence > Tools and Select the Diagnostics tab. At the top, click
   the button that says “Send Report by Email.” Change the email address to [asa@wordfence.com](https://wordpress.org/support/topic/php-message-deadlock-found/asa@wordfence.com?output_format=md)
   and please provide your forum username so I know who the mail is coming from.
 * Thanks!
 *  Thread Starter [CharleyBoy](https://wordpress.org/support/users/charleyboy/)
 * (@charleyboy)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10880323)
 * Done, thank you.
 *  [wfasa](https://wordpress.org/support/users/wfasa/)
 * (@wfasa)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10895414)
 * Hi Charley,
    Thanks. I got your diagnostics. We’ve made a bit of progress on 
   debugging this and we think it may be happening on sites where the GeoLite2-Country.
   mmdb (The GeoIP country database) fails to sync as it should.
 * I’m not sure how comfortable you are modifying the database directly via phpMyAdmin
   but if you are, you can try this
 * 1. Delete GeoLite2-Country.mmdb file located in wflogs
    2. Delete “_transient_timeout_wfSyncGeoIPActive”
   and “_transient_wfSyncGeoIPActive” from the wp_options table
 * If that works, let me know!
 *  Thread Starter [CharleyBoy](https://wordpress.org/support/users/charleyboy/)
 * (@charleyboy)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10913387)
 * Ok we are giving it a try
 *  [wfdave](https://wordpress.org/support/users/wfdave/)
 * (@wfdave)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10948190)
 * Hi [@charleyboy](https://wordpress.org/support/users/charleyboy/),
 * I’ll be taking over this thread now!
 * Let me know if you are able to get it working 🙂
 * Dave
 *  Thread Starter [CharleyBoy](https://wordpress.org/support/users/charleyboy/)
 * (@charleyboy)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10956080)
 * Hi,
    We did what was proposed, but we are still getting tons of 500 errors. Mostly
   when we are doing something in the admin panel, like a new article. Visitors 
   dont seem to have that problem.
 *     ```
       2018/12/06 08:32:52 [error] 976#976: *7384734 FastCGI sent in stderr: "PHP message: Erreur de la base de données WordPress Deadlock found when trying to get lock; try restarting transaction pour la requête INSERT IGNORE INTO'wp_wfConfig'('name','val', $
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: *7406911 open() "/var/www/html/wp-content/uploads/2018/12/unite-9-auteure.jpg" failed (24: Too many open files), client: 24.203.206.223, server: exemple.com, request: "GET /wp-content/uploads/2018/12/unite-9-auteu$
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: *7406934 open() "/var/www/html/wp-content/uploads/2018/12/unite-9-auteure.jpg" failed (24: Too many open files), client: 70.82.222.87, server: exemple.com, request: "GET /wp-content/uploads/2018/12/unite-9-auteure$
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: *7406903 open() "/var/www/html/wp-content/uploads/2018/12/unite-9-auteure-1024x543.jpg" failed (24: Too many open files), client: 204.48.95.65, server: exemple.com, request: "GET /wp-content/uploads/2018/12/unite-$
       2018/12/06 11:22:21 [crit] 976#976: *7406966 open() "/var/www/html/wp-content/uploads/2018/12/unite-9-auteure.jpg" failed (24: Too many open files), client: 2001:56b:dc48:5700:c453:f7e9:7f1:cf2c, server: exemple.com, request: "GET /wp-content/upload$
       2018/12/06 11:22:21 [crit] 976#976: *7406942 open() "/var/www/html/wp-content/uploads/2018/12/unite-9-auteure-1024x543.jpg" failed (24: Too many open files), client: 70.53.200.183, server: exemple.com, request: "GET /wp-content/uploads/2018/12/unite$
       2018/12/06 11:22:21 [crit] 976#976: *7406954 open() "/var/www/html/wp-content/uploads/2018/12/unite-9-auteure.jpg" failed (24: Too many open files), client: 70.81.210.25, server: exemple.com, request: "GET /wp-content/uploads/2018/12/unite-9-auteure$
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:21 [crit] 976#976: accept4() failed (24: Too many open files)
       2018/12/06 11:22:22 [crit] 976#976: accept4() failed (24: Too many open files)
       ```
   
    -  This reply was modified 7 years, 5 months ago by [CharleyBoy](https://wordpress.org/support/users/charleyboy/).
    -  This reply was modified 7 years, 5 months ago by [CharleyBoy](https://wordpress.org/support/users/charleyboy/).

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

The topic ‘PHP message: Deadlock found’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [CharleyBoy](https://wordpress.org/support/users/charleyboy/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/php-message-deadlock-found/#post-10956080)
 * Status: not resolved