{"id":3458,"date":"2012-08-31T17:41:29","date_gmt":"2012-08-31T12:11:29","guid":{"rendered":"http:\/\/www.bhagwad.com\/blog\/?p=3458"},"modified":"2012-08-31T17:41:29","modified_gmt":"2012-08-31T12:11:29","slug":"solving-intermittent-wordpress-database-connection-errors","status":"publish","type":"post","link":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/","title":{"rendered":"Solving Intermittent WordPress Database Connection Errors"},"content":{"rendered":"<p>A week ago, my website suddenly started becoming non responsive. Pages would take forever to load and going to the dashboard to post was a nightmare, and worst of all, I was starting to get\u00a0inundated\u00a0with &#8220;500 coded&#8221; database connection errors. I place a lot of emphasis on keeping my site running fast and smoothly and delays of this sort were disastrous for me. I was at my wits end.<\/p>\n<p>I have a shared hosting plan with Bluehost and also use the free Cloudflare service. So not a lot of resources at my disposal either.<\/p>\n<p>Errors of the sort shown in the screenshot below would often disappear if I refreshed the page. I tried just &#8220;waiting it out&#8221; figuring that Bluehost was having issues at their end, but it continued on for several days. At times my blog would become <em>completely<\/em> unresponsive and just sit there trying to connect and would then show an error page.<\/p>\n<p>Later, my server logs revealed that I was getting around <em>1500 error results on my site every day!<\/em> That meant legitimate visitors were being forced to wait for long periods of time and ultimately not getting the content they came for.<\/p>\n<figure id=\"attachment_3459\" aria-describedby=\"caption-attachment-3459\" style=\"width: 612px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3459 \" title=\"Sudden WordPress Database Error\" src=\"http:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg\" alt=\"Sudden WordPress Database Error\" width=\"622\" height=\"415\" srcset=\"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg 622w, https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error-300x200.jpg 300w, https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error-150x100.jpg 150w, https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error-400x266.jpg 400w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><figcaption id=\"caption-attachment-3459\" class=\"wp-caption-text\">Sudden WordPress Database Error<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>The WordPress forums didn&#8217;t help. They all dealt with issues like the password combo being wrong, or replacing &#8220;localhost&#8221; with the name of the server in wp-config.php. But none of these account for the fact that the errors were random. If there was really a configuration problem, they wouldn&#8217;t vanish on a page refresh. Besides, I&#8217;ve been maintaining this blog for several years now and there&#8217;s never been anything of this sort before. I hadn&#8217;t changed anything.<\/p>\n<p>So I called Bluehost to complain. After the woman on the other end spent time consulting with the tech person, she told me that my site was getting overwhelmed by visitors. The shared plan I was on allowed only 15 database connections per second. She told me to be happy that I had outgrown the plan I was on!\u00a0I told her this wasn&#8217;t possible because my Google analytics wasn&#8217;t showing any such dramatic increase in visitors. She then visited the stats page and there we found the problem.<\/p>\n<p>My site was swamped with spam and bots. By half the month, one single unknown bot had eaten up 1.5 GB of bandwidth and had hit my site 29,000 times! In addition, Bluehost has a CPU throttling facility where if a site uses up too much CPU power to the detriment of the others, it&#8217;s cut down. That screen was showing me that my CPU was being throttled for around 60,000 seconds a day &#8211; meaning almost all the time!\u00a0Well, at least now that I knew what was wrong I could try and do something about it.<\/p>\n<p>I had become complacent about traffic and bot management on WordPress because I use Cloudflare and they&#8217;re supposed to block out most undesirables. Unfortunately, I had found that even the &#8220;medium&#8221; security setting was blocking many legitimate users of my site who had complained, so my filter was on &#8220;low&#8221;. Clearly this wasn&#8217;t doing a good enough job. So I temporarily put it on high while I sorted out the issue at my end.<\/p>\n<p>To no avail. The bots kept coming, and now that I knew what to look for I was shocked at how aggressive they were. My site was completely\u00a0inaccessible\u00a0and I had to switch on the &#8220;I&#8221;m under attack!&#8221; mode in the Cloudflare control panel where all visitors got a 5 second delay and turned aside if they were bots. I had to do this to access my site while I tried to fix things.<\/p>\n<h2>&#8220;Bad Behavior&#8221;, &#8220;Better WP Security&#8221; and &#8220;ecSTATic&#8221;<\/h2>\n<p>I noticed that my &#8220;wp-login&#8221; page was being hit the most. I had to beef up my security. So two plugins came to the rescue. <a href=\"http:\/\/wordpress.org\/extend\/plugins\/bad-behavior\/\">&#8220;Bad Behavior&#8221;<\/a> is one that modifies your .htaccess file to block all kind of baddies at your doorstep. It also allows you enter your <a href=\"http:\/\/www.projecthoneypot.org\/home.php\">Project Honeypot<\/a>\u00a0key so that all known visitors with a threat level of 25 and above are stopped. I had to sign up with Projecty Honeybot to get a key and also enabled &#8220;Strict checking&#8221; in the plugin. I&#8217;m not sure what that option does, but it blocks more malicious visitors.<\/p>\n<p>More important than Bad Behavior though was a plugin called <a href=\"http:\/\/wordpress.org\/extend\/plugins\/better-wp-security\/\">&#8220;Better WP Security&#8221;<\/a>\u00a0that really hardens your site. Among other things it changes the admin and login page locations to something else, thus denying bots convenient attack locations returning a 403 instead of wasting bandwidth on your site even if they\u00a0<em>don&#8217;t\u00a0<\/em>succeed. This alone saved my site from thousands of hits. But the plugin also does a LOT more from removing the default &#8220;admin&#8221; user, to allowing you to ban bots and users from your site and also scans it for security vulnerabilities.<\/p>\n<p>The final plugin is called <a href=\"http:\/\/wordpress.org\/extend\/plugins\/ecstatic\/\">&#8220;ecSTATic&#8221;<\/a>. This is a very powerful plugin for banning bots from your site. There is an option called &#8220;WTF&#8221; or &#8220;Way too fast&#8221; which you configure to ban any bot that makes too many requests within a certain period of time. Plus you can also block all unknown bots which is fairly safe I guess since the &#8220;known&#8221; list is pretty extensive. And you can configure detailed rules for denying access based on user agent or IP addresses.<\/p>\n<p>Banning bots like this is necessary if they don&#8217;t follow robots.txt as described in the next section.<\/p>\n<h2>Robots.txt<\/h2>\n<p>I had ignored my robots.txt for quite a while since I believed that cloudflare would filter out misbehaving bots. But it didn&#8217;t. Even at the &#8220;high&#8221; security levels, cloudflare doesn&#8217;t do a good job of protecting your site from bad behaving bots that eat up your bandwidth and hit your database. It&#8217;s up to you alone.<\/p>\n<p>So the first thing you do is to check your server logs. Every site has a few irritating spiders that hit it too often. My bane during this difficult time was &#8220;80 Legs&#8221; and &#8220;008 AhrefsBot&#8221;. So I disallowed them in my robots.txt file like so:<\/p>\n<blockquote><p>User-agent: 008<br \/>\nDisallow: \/<\/p>\n<p>user-agent: AhrefsBot<br \/>\nDisallow: \/<\/p><\/blockquote>\n<p>Unfortunately, only 80 Legs followed robots.txt. AhrefsBot simply ignored it. That&#8217;s what bad bots do and they deserve to get their ass banned either using the plugins I showed earlier, or using .htaccess. This practice alone has relieved my site of a ton of traffic.<\/p>\n<h2>Blocking URL Parameters and Archive Pages<\/h2>\n<p>Going over the list of pages crawled by Google and others, I found that a whole ton of useless URLs were being crawled. As a WordPress blog, all my posts have multiple &#8220;replytocom&#8221; URL parameters. One for each comment I think. And these were being crawled by Google &#8211; around 7000 pages worth! And I have just\u00a0\u00a0464 unique posts. The solution is to block these URL parameters from being crawled using robots.txt. So for me, the relevant entry was:<\/p>\n<blockquote><p>Disallow: *?replytocom<\/p><\/blockquote>\n<p>This puts a stop to a lot of crawls that were eating up my bandwidth and unnecessarily hitting up my database. There&#8217;s also an option in Google&#8217;s Webmaster tools that can let you specify what URL parameters you don&#8217;t want them to crawl. But the robots.txt entry is more elegant if you have control over it. Otherwise, the webmaster tools section will do just fine &#8211; but only for controlling Google crawlers naturally.<\/p>\n<h2>End Result of the above steps<\/h2>\n<p>My efforts paid off. In the next few days, my &#8220;500 code&#8221; database errors disappeared to almost nothing and my website loading speeds went back to normal levels. I kept a close watch on my stats and visitors as well as the Bluehost throttling panel for the next week to catch any relapses and ban any more misbehaving bots. But so far, it&#8217;s been pretty smooth sailing.<\/p>\n<p>I saved my WordPress blog of six years for free and improved my security to boot!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.<\/p>\n","protected":false},"author":2,"featured_media":3459,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,33,23],"tags":[],"class_list":["post-3458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nr","category-sa","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Solving Intermittent Wordpress Database Connection Errors<\/title>\n<meta name=\"description\" content=\"How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Solving Intermittent Wordpress Database Connection Errors\" \/>\n<meta property=\"og:description\" content=\"How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/\" \/>\n<meta property=\"og:site_name\" content=\"Expressions - Bhagwad Jal Park\" \/>\n<meta property=\"article:published_time\" content=\"2012-08-31T12:11:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"622\" \/>\n\t<meta property=\"og:image:height\" content=\"415\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"bhagwad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bhagwad\" \/>\n<meta name=\"twitter:site\" content=\"@bhagwad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"bhagwad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/\"},\"author\":{\"name\":\"bhagwad\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/#\\\/schema\\\/person\\\/06c9c710885b810f1dfe3779fc346b23\"},\"headline\":\"Solving Intermittent WordPress Database Connection Errors\",\"datePublished\":\"2012-08-31T12:11:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/\"},\"wordCount\":1348,\"commentCount\":14,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/#\\\/schema\\\/person\\\/06c9c710885b810f1dfe3779fc346b23\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/08\\\/Wordpress-Database-Error.jpg\",\"articleSection\":[\"NR\",\"SA\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/\",\"url\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/\",\"name\":\"Solving Intermittent Wordpress Database Connection Errors\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/08\\\/Wordpress-Database-Error.jpg\",\"datePublished\":\"2012-08-31T12:11:29+00:00\",\"description\":\"How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/08\\\/Wordpress-Database-Error.jpg\",\"contentUrl\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/08\\\/Wordpress-Database-Error.jpg\",\"width\":\"622\",\"height\":\"415\",\"caption\":\"Sudden Wordpress Database Error\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/2012\\\/technology\\\/solving-intermittent-wordpress-database-connection-errors.html\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Solving Intermittent WordPress Database Connection Errors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/\",\"name\":\"Expressions - Bhagwad Jal Park\",\"description\":\"My thoughts, haikus and freelance musings\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/#\\\/schema\\\/person\\\/06c9c710885b810f1dfe3779fc346b23\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/#\\\/schema\\\/person\\\/06c9c710885b810f1dfe3779fc346b23\",\"name\":\"bhagwad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388\",\"url\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388\",\"contentUrl\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388\",\"caption\":\"bhagwad\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.bhagwad.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388\"},\"sameAs\":[\"http:\\\/\\\/www.bhagwad.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Solving Intermittent Wordpress Database Connection Errors","description":"How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/","og_locale":"en_US","og_type":"article","og_title":"Solving Intermittent Wordpress Database Connection Errors","og_description":"How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.","og_url":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/","og_site_name":"Expressions - Bhagwad Jal Park","article_published_time":"2012-08-31T12:11:29+00:00","og_image":[{"width":622,"height":415,"url":"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg","type":"image\/jpeg"}],"author":"bhagwad","twitter_card":"summary_large_image","twitter_creator":"@bhagwad","twitter_site":"@bhagwad","twitter_misc":{"Written by":"bhagwad","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#article","isPartOf":{"@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/"},"author":{"name":"bhagwad","@id":"https:\/\/www.bhagwad.com\/blog\/#\/schema\/person\/06c9c710885b810f1dfe3779fc346b23"},"headline":"Solving Intermittent WordPress Database Connection Errors","datePublished":"2012-08-31T12:11:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/"},"wordCount":1348,"commentCount":14,"publisher":{"@id":"https:\/\/www.bhagwad.com\/blog\/#\/schema\/person\/06c9c710885b810f1dfe3779fc346b23"},"image":{"@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg","articleSection":["NR","SA","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/","url":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/","name":"Solving Intermittent Wordpress Database Connection Errors","isPartOf":{"@id":"https:\/\/www.bhagwad.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#primaryimage"},"image":{"@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg","datePublished":"2012-08-31T12:11:29+00:00","description":"How to correct intermittent database connection errors on Wordpress. This happens when your site is being hit with too much traffic. Most likely from bots.","breadcrumb":{"@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#primaryimage","url":"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg","contentUrl":"https:\/\/www.bhagwad.com\/blog\/wp-content\/uploads\/2012\/08\/Wordpress-Database-Error.jpg","width":"622","height":"415","caption":"Sudden Wordpress Database Error"},{"@type":"BreadcrumbList","@id":"https:\/\/www.bhagwad.com\/blog\/2012\/technology\/solving-intermittent-wordpress-database-connection-errors.html\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bhagwad.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Solving Intermittent WordPress Database Connection Errors"}]},{"@type":"WebSite","@id":"https:\/\/www.bhagwad.com\/blog\/#website","url":"https:\/\/www.bhagwad.com\/blog\/","name":"Expressions - Bhagwad Jal Park","description":"My thoughts, haikus and freelance musings","publisher":{"@id":"https:\/\/www.bhagwad.com\/blog\/#\/schema\/person\/06c9c710885b810f1dfe3779fc346b23"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bhagwad.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.bhagwad.com\/blog\/#\/schema\/person\/06c9c710885b810f1dfe3779fc346b23","name":"bhagwad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bhagwad.com\/blog\/wp-content\/litespeed\/avatar\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388","url":"https:\/\/www.bhagwad.com\/blog\/wp-content\/litespeed\/avatar\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388","contentUrl":"https:\/\/www.bhagwad.com\/blog\/wp-content\/litespeed\/avatar\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388","caption":"bhagwad"},"logo":{"@id":"https:\/\/www.bhagwad.com\/blog\/wp-content\/litespeed\/avatar\/7940f38fc479ebe739ec963b542bf098.jpg?ver=1782319388"},"sameAs":["http:\/\/www.bhagwad.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/posts\/3458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/comments?post=3458"}],"version-history":[{"count":0,"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/posts\/3458\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/media\/3459"}],"wp:attachment":[{"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/media?parent=3458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/categories?post=3458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bhagwad.com\/blog\/wp-json\/wp\/v2\/tags?post=3458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}