Title: Fatal Error &#8211; Infinite Loop
Last modified: February 8, 2024

---

# Fatal Error – Infinite Loop

 *  [cucurutcho](https://wordpress.org/support/users/igorshiota/)
 * (@igorshiota)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/)
 * Eventual WP critical error page “this website has a critical error” pops up when
   navigating around the site at random pages. When we see the page, sometimes a
   refresh will bring the page back.
 * Checking logs (edited sensitive data):
 * [XX-XX-2024 15:XX:02 UTC] PHP Fatal error: Uncaught Error: Xdebug has detected
   a possible infinite loop, and aborted your script with a stack depth of ‘512’
   frames in /XX/XX/XX/XX/plugin.php:989 Stack trace:
 * #6 /xx/xx/xx/xx/plugins/w3-total-cache/DbCache_WpdbNew.php(246): wpdb->prepare(‘
   SELECT option_v…’, ‘auth_key’)
 * More info might be needed for this, but essentially, it’s the only plugin mentioned
   in this stack trace and if you deacivate W3, no more critical errors occur.
 * All other themes and plugins are up to date on the site, as well as WordPress
   core.
 * Can anyone help?

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17412345)
 * Hello [@igorshiota](https://wordpress.org/support/users/igorshiota/)
 * Thank you for reaching out and I am happy to help!
   Can you please share when 
   you started to experience this issue, meaning if you have changed the configuration
   within the plugin or server?Can you also please share which caching method you
   are using for DB caching?
 * Thanks!
 *  Thread Starter [cucurutcho](https://wordpress.org/support/users/igorshiota/)
 * (@igorshiota)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17412606)
 * Hi Marko, thanks for your reply. We have noticed the issue a few days after we
   installed the plugin. I could send you the export of the settings we have if 
   you like? Let me know the best way to send you that.
 * W3 is the only caching method we use. Let me know if you need any other info.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17412972)
 * Hello [@igorshiota](https://wordpress.org/support/users/igorshiota/)
 * Thank you for your feedback.
   In the Performance>General settings, Database caching
   section, what is the caching method selected for Database caching?
 * Thanks!
 *  Thread Starter [cucurutcho](https://wordpress.org/support/users/igorshiota/)
 * (@igorshiota)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17413027)
 * It’s this:
 * Database Cache: Enable
 * Database Cache method Disk
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17413321)
 * Hello [@igorshiota](https://wordpress.org/support/users/igorshiota/)
 * Thank you for your feedback.
 *  The disk-based caching is not that efficient. In other words, if you are on 
   a shared hosting, it’s recommended not to use database caching.
 * Moreover, using disk-database caching (on shared hosting) can make your site 
   slower. This is so because getting data from the database can be faster than 
   getting cached data from the disk
   This being said, if you do not have an option
   for memory-based caching like Redis or Memcached, please disable DB caching, 
   save all settings, and purge the cache.
 * Let me know if this helps!
   Thanks!
 *  Thread Starter [cucurutcho](https://wordpress.org/support/users/igorshiota/)
 * (@igorshiota)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17413405)
 * Hi Marko, we are doing some memory management in our server, so I’m not sure 
   about direct db queries (which could cause out of mem for us)
 * We do run a dedicated server (not shared) and we have nvme ssd, so we shouldn’t
   have problems with disk as they’re super fast. So I’m not sure issue is related
   to that? Could we investigate further?
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17435899)
 * Hello [@igorshiota](https://wordpress.org/support/users/igorshiota/)
 * Thank you for your feedback.
   Generally speaking it’s not a good idea to use Database
   caching with Disk based caching solution.
 * Can you please run the setup guide wizard and let me know what is the recommended
   setting for DB caching?
 * Also do you have an option to use Redis or Memcached?
   Thanks!
 *  Thread Starter [cucurutcho](https://wordpress.org/support/users/igorshiota/)
 * (@igorshiota)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17440387)
 * Hi Marko, we have this:
 * Storage Engine / Time (ms)
 * None / 1044.79
 * Disk (selected) / 1.07(-99.90%)
 * Memcached / 2.13 (-99.80%)
 * The other options are there but they say Unavailable.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17440553)
 * Hello [@igorshiota](https://wordpress.org/support/users/igorshiota/)
 * Please switch to memcached and let me know if this helps!
 * Thanks!

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

The topic ‘Fatal Error – Infinite Loop’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-infinite-loop/#post-17440553)
 * Status: not resolved