Title: PHP Fatal error: Uncaught mysqli_sql_exception
Last modified: May 2, 2024

---

# PHP Fatal error: Uncaught mysqli_sql_exception

 *  Resolved [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-mysqli_sql_exception/)
 * Hi,
 * Today we had a large scale attack and there are several of those in the error.
   log (for some reason nothing was logged in the enabled debug.log):
 * [02-May-2024 14:44:01 Europe/Athens] PHP Fatal error: Uncaught mysqli_sql_exception:
   Resource temporarily unavailable in /home/public_html/wp-content/plugins/ninjafirewall/
   lib/firewall.php:439
    Stack trace: #0 /home/public_html/wp-content/plugins/ninjafirewall/
   lib/firewall.php(439): mysqli_real_connect() #1 /home/public_html/wp-content/
   plugins/ninjafirewall/lib/firewall.php(93): nfw_connect() #2 /home/public_html/
   wp-content/nfwlog/ninjafirewall.php(10): include_once(‘/home/public_html/…’) #
   3 {main} thrown in /home/public_html/wp-content/plugins/ninjafirewall/lib/firewall.
   php on line 439
 * Apparently the sql was accepting a huge ammount of connections and refused to
   serve more for a while. We had to mitigate it, changing our IP. It came from 
   a “cloud” platform of a well known company.
 * Not sure if the exception should be more kindly treated or not. Also not an issue
   for me, JFYI to maybe help make the plugin better.
 * Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-mysqli_sql_exception/#post-17730615)
 * The plugin makes one single connection to the DB, but it was not reachable because
   of the attack, hence the fatal error. The call to `mysqli_real_connect()` is 
   silenced with error control operator `@`, just like WordPress does. I don’t know
   if we can/need to change anything, because there’s no way the site can recover
   from that. Even without NinjaFirewall, WordPress couldn’t load and would throw
   the same error.

Viewing 1 replies (of 1 total)

The topic ‘PHP Fatal error: Uncaught mysqli_sql_exception’ is closed to new replies.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-mysqli_sql_exception/#post-17730615)
 * Status: resolved