Title: Database Error Until Purge all Cache
Last modified: February 3, 2022

---

# Database Error Until Purge all Cache

 *  Resolved [owenfar](https://wordpress.org/support/users/owenfar/)
 * (@owenfar)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/)
 * Every second week or so, we are having a Database connection error which brings
   the whole site down, this is happening until I purge cache on all pages.
 * This never happened on other sites, the only difference I can think of so far
   is that this site sits directly on DigitalOceans custom server. What could be
   the issue? As I said, the whole site is down (with DB conn err), until I purge
   cache from WP Optimize.
 * It is very strange, I’ve used this plugin on many sites and it works amazingly
   well.
 * Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-error-until-purge-all-cache%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15327225)
 * [@owenfar](https://wordpress.org/support/users/owenfar/)
 * Could you send me a copy of your server’s PHP Error log?
    You can paste it here
   [https://pastebin.com](https://pastebin.com) and share the link with us. You 
   can find this log through your web hosting control panel (typically cPanel). 
   If you are unsure where to find the PHP Error log, you can ask your hosts to 
   provide it.`
 *  Thread Starter [owenfar](https://wordpress.org/support/users/owenfar/)
 * (@owenfar)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15329877)
 * Hello [@bornforphp](https://wordpress.org/support/users/bornforphp/),
 * Thank you for your quick response.
 * Please find some of the error logs here from the day of DB error: [https://pastebin.com/3DziCpAU](https://pastebin.com/3DziCpAU)
 * I think the error happens here: `PHP Fatal error: Uncaught Error: Call to undefined
   function wp_cache_get() in /var/www/html/wp-includes/option.php:146\nStack trace:\
   n#0 /var/www/html/wp-includes/l10n.php(63): get_option()\n#1 /var/www/html/wp-
   includes/l10n.php(137): get_locale()\n#2 /var/www/html/wp-includes/l10n.php(1285):
   determine_locale()\n#3 /var/www/html/wp-includes/l10n.php(1247): _get_path_to_translation_from_lang_dir()\
   n#4 /var/www/html/wp-includes/l10n.php(1217): _get_path_to_translation()\n#5 /
   var/www/html/wp-includes/l10n.php(1315): _load_textdomain_just_in_time()\n#6 /
   var/www/html/wp-includes/l10n.php(185): get_translations_for_domain()\n#7 /var/
   www/html/wp-includes/l10n.php(297): translate()\n#8 /var/www/html/wp-content/
   plugins/wp-optimize/cache/file-based-page-cache-functions.php(37): __()\n#9 [
   internal function]: wpo_cache()\n#10 {main}\n thrown in /var/www/html/wp-includes/
   option.php on line 146`
 * But I’m not sure what to do with this.
 * Hope you can identify better.
 * Thanks in advance,
    Owen
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15331151)
 * [@owenfar](https://wordpress.org/support/users/owenfar/) Do you have any other
   caching plugin enabled or having caching mechanism on the server, if so could
   you please temporary disable it and check if it works?
 *  Thread Starter [owenfar](https://wordpress.org/support/users/owenfar/)
 * (@owenfar)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15333433)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/) No other caching
   plugins on WordPress, still waiting for a response from the team if we have Cloudflare,
   if you think that might cause such an issue. Otherwise no caching directly on
   the server either.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15335558)
 * [@owenfar](https://wordpress.org/support/users/owenfar/) Yes, lets see if its
   a Cloudflare issue?
 *  Thread Starter [owenfar](https://wordpress.org/support/users/owenfar/)
 * (@owenfar)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15336357)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/) It is on Cloudflare,
   but as far as I can tell only the DNS service is being used. Have you had any
   issues because of this before, or is this the first time?
 * From my side it’s actually the first project that has both Cloudflare and WP 
   Optimize, other projects on Cloudflare have different caching systems.
 * Would be great if you can help, as I really like to keep this caching plugin,
   best one I know by far.
 * Thanks again,
    Owen
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15339868)
 * [@owenfar](https://wordpress.org/support/users/owenfar/) This is the first time
   we have seen such issue.
 * Have you performed a conflict test yet?
 * Try deactivating all plugins except for UpdraftPlus and see if it is resolved.
 * If so, reactivate each plugin one at a time until you find the culprit. You can
   check for the issue between activating each plugin, so you can see which one 
   is causing problems.
 * Please let us know your findings.
 *  Thread Starter [owenfar](https://wordpress.org/support/users/owenfar/)
 * (@owenfar)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15340707)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/) I updated all 
   plugins and left everything as is for now. I cannot disable all plugins because
   the site wouldn’t work otherwise. If it happens again I will disable WP Optimize
   and wait for another error if any come up, and move on from there.
 * I can keep you updated here if/when I discover the conflict.
 * Thank you for your support.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15345722)
 * [@owenfar](https://wordpress.org/support/users/owenfar/) Sure thing, do let us
   know!
 *  [Rafael](https://wordpress.org/support/users/rafaelninvalle/)
 * (@rafaelninvalle)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15487355)
 * Hey [@owenfar](https://wordpress.org/support/users/owenfar/)
 * Did you ever resolve this issue? Just want to know because it seems I may be 
   facing something similar.
    -  This reply was modified 4 years, 2 months ago by [Rafael](https://wordpress.org/support/users/rafaelninvalle/).
 *  Thread Starter [owenfar](https://wordpress.org/support/users/owenfar/)
 * (@owenfar)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15488172)
 * Hello [@rafaelninvalle](https://wordpress.org/support/users/rafaelninvalle/),
 * The problem never appeared again after the updates.
 * I guess best chance is to try another caching plugin in the meantime, to see 
   if it will happen again. This way you can eliminate whether the problem is coming
   from WP-Optimize or not.
 *  [Rafael](https://wordpress.org/support/users/rafaelninvalle/)
 * (@rafaelninvalle)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15488219)
 * Hey [@owenfar](https://wordpress.org/support/users/owenfar/),
 * Thanks so much for your quick response! I’ll definitely try that.
 * Take care.
 * Regards,
 * Rafa

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

The topic ‘Database Error Until Purge all Cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

## Tags

 * [database connection error](https://wordpress.org/support/topic-tag/database-connection-error/)

 * 12 replies
 * 3 participants
 * Last reply from: [Rafael](https://wordpress.org/support/users/rafaelninvalle/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/database-error-until-purge-all-cache/#post-15488219)
 * Status: resolved