Solved

Random database connection error in WordPress

Posted on 2013-01-09
6
307 Views
Last Modified: 2013-02-11
We're switching several websites over to WordPress and we're getting random "dabase connection" errors.  If we refresh the page, the site comes up fine.  The problem has increased since we began switching our sites over to WordPress.

We're using a shared Windows hosting plan.

I'm also getting the error with some custom PHP connections outside of WordPress.

I'm working with my webhost to see if they can isolate the problem but they can't reproduce it.

Any suggestions would be appreciated.

Thanks,

Steve
0
Comment
Question by:stkoontz
  • 3
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38761199
The problem has increased since we began switching our sites over to WordPress.

The above implies the problem was present before the switch? If so, the following should be taken extremely skeptically:

they can't reproduce it.

Do other users see the errors?  Or is it just limited to you?
0
 
LVL 2

Author Comment

by:stkoontz
ID: 38761397
Last spring I saw the error once a week or so.  It wasn't enough to worry about.  We've added several WordPress sites in the last few weeks and there are days when we'll see the error every few hours.  So far no one on the outside has complained, but I'm concerned people are getting the error and not letting us know.

I work with another person on the WordPress sites at work and both of us get the error.

I manage a WordPress site from home with the same hosting company, but a different hosting plan.  I was working on the site this evening and the error popped up once.

Thanks for the response and help.  I appreciate it.

Steve
0
 
LVL 1

Accepted Solution

by:
shawnlearn earned 500 total points
ID: 38848467
Just to be sure, check all your DB strings.

I have faced such issues in past. In my case also hosting company couldn't reproduce the DB connection fail error(s). This was mainly because they were nearer to the server and I was in a different country. I know error isn't consistent, sometimes this error doesn't pop up at all.

I then switched to different host and everything was working super. My suggestion is to either upgrade your hosting configuration or change your host to a better one with more up time.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Author Comment

by:stkoontz
ID: 38851142
Thanks for the suggestions.  I've switched to a Linux host and am in the process of moving the WordPress sites to it.  So far so good.  I'll leave this open for a few days to make sure that's the problem.

I'm curious. What host did you switch to?

Steve
0
 
LVL 1

Expert Comment

by:shawnlearn
ID: 38851194
Steve for Linux I prefer Godaddy for two reasons

A) Best for Linux / cent os servers
B) Excellent support

If you opt for godaddy make sure you use US region servers not Asia Pacific.
0
 
LVL 2

Author Closing Comment

by:stkoontz
ID: 38876013
Switching to the new webhost has helped the problem.  Thanks!

Steve
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question