Jump to content
OSCNewbie2

Site suddenly "Unable to connect to database server!" - Why? "7mwjh2" error ID?

Recommended Posts

Hi All,

So after running OK for months, my friend's osCommerce site has suddenly gone down and we only get this message - "Unable to connect to database server!"

The server is running -
osCommerce V v2.3.4
PHP Version     7.0.33
MySQL Version     5.6.49
Architecture     x86_64
Operating System     linux
Disk Usage - 3.36 GB / 9.28 GB (36.23%)
MySQL® Disk Usage - 1.11 GB / 7.03 GB (15.81%)
Bandwidth - 29.42 MB / 39.06 GB (0.07%)

When I hit the "Check Database" button under the "MySQL® Databases" page in cPanel, I got this error message -
"There was a problem checking the database “tymbada8_osc1”. The request failed. (Error ID: 7mwjh2) Ask your hosting provider to research this error in cPanel & WHM’s main error log. "

So then I went to cPanel->Metrics->Errors and I found this -
"HP Warning:  mysqli_connect(): (08004/1040): Too many connections in /home/tymbada8/public_html/includes/functions/database.php on line 20"

I then downloaded that database.php file and had a look at it, and on line 20 is this -
"$$link = mysqli_connect($server, $username, $password, $database);"

I've looked through the archives on the forum for an answer, but can't find a clear solution.

I've also looked at the configuration.php and configure.php files on the server and can't seem to find anything wrong with those either, but bear in mind that I'm an osCommerce newbie, not a coder, and it's possible that I missed something.

I can log in to the cPanel account no problem, but I don't have the user and password to log in to phpMyAdmin, or if I did I can't find them at the mo.

Before we call the ho$ting company for help, does anyone have any ideas?  Wld be appreciated, thanks.

Edited by OSCNewbie2

Share this post


Link to post
Share on other sites

My guess is that your site was hit with a mass attempt to log in, or some sort of DoS attack. They gave up and moved on.

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
6 hours ago, OSCNewbie2 said:

Too many connections

This is because the number of connections to your account has exceeded its limit. When that happens, the mysql service on the server will disconnect. The time to reconnect is usually only seconds but if the site is being hit hard, it will happen again so, overall, it can last minutes, or even hours.. You can read through some of these threads for other details but the bottom line is that you have to stop some of the connections to prevent this from happening.  The problem may have gone away for now but, in my experience, once they find your site, they will be back so you can expect it to happen again.

Most shop owners are amazed to learn that even if there is only one customer on the site, this sort of thing can happen. That is because there are hackers and search bots searching the site in the background.  If you install View Counter you will be able to see the various connections and to block them, either by IP or country. 

Share this post


Link to post
Share on other sites

Thanks for the replies, much appreciated.
We found out from the hosting provider the next day, they had moved the entire website and store to another hosting provider without advising my friend about it or asking her if she wanted it moved. We think that was the problem, we caught it in the middle of the move.

Anyway NOW the problem is that we need to get into cPanel to make certain changes and to be able to update the SSL when it comes due, do backups etc, and when we asked for the new cPanel log-on info, her hosting company emailed her with this -
"Our new server is not having Capnel, it's a highly scalable cloud server with bare Linux OS without any panel."

Sounds suspect to me, I've never heard of a commercial web hosting provider that didn't offer some sort of management panel for users to tap in to, but I  might be wrong as I always had web hosting accounts for multiple websites, and not just one site like this one my friend has.

The site is now up and running on the new web host, and Builtwith.com say's it's Digital Ocean, but other WhatTech sites say it's hostgator, may they're the same thing now. Right now I'm trying to figure out how to check if cPanel is running the back of a site.

Without access to the back-end / cPanel, we can't easily make some of the backups we need to do, plus other changes to some of the content and installing the SSL.

If there's a tech guru here who can run a test to see if cPanel is on a certain IP address or website, that would help when we discuss this with the hosting provider.

All this just reinforces our idea of why we need to move this site from overseas to a good hosting platform here in the USA. And then after the holidays,  to a new ecommerce platform.

Any suggestions welcome, many thanks..

Share this post


Link to post
Share on other sites
10 hours ago, OSCNewbie2 said:

they had moved the entire website and store to another hosting provider without advising my friend about it or asking her if she wanted it moved.

Very shady. That would make me worry that they would make some other change tomorrow that will affect the site.

10 hours ago, OSCNewbie2 said:

If there's a tech guru here who can run a test to see if cPanel is on a certain IP address or website

Cpanel is generally reached by https:// your domain name or IP /cpanel 

It is possible for the host to alter the patch so it shows as something else but very few do so, in my experience, since it is not worth the effort.

It is probably more likely that the host is not using cpanel. There are open source control panels that some hosts use since they are much less costly. And some, that really shouldn't be called hosts,  just divide up a serve they have and give limited access to it. For those types of account, you won't have a control panel since it can't be shared with the other accounts.

With all things considered, your friend really should consider moving hosts.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×