Web Hosting Talk







View Full Version : MySQL problems with host


easypooltutor
03-28-2001, 01:21 PM
I recently signed up with Tera-byte hosting based on suggestions from many of you in this board. So far, support has been excellent... they have answered my questions within a reasonable amount of time and they have never ignored any of my e-mails :) unlike my previous host.

Anyway, I am having "MySQL Connection Failed: Too many connections" problems and Tera-byte support says:

"This is often the result of a shared mysql server. your account is on shared hosting, and as such all connections to the mysql db are counted towards the max, not just your connections."

"You may have intermittent issues, as there are other sites also utilizing mysql on the same server. The only way to prevent it completely is to have your own server."

I understand the reasoning completely but I had e-mailed them again and asked if my site can be transferred to another server since I've never had this problem with all my other hosts before.

My question is... am I asking too much for <$10 a month of hosting? I mean, my problem is I get this too many of this problem with MySQL (almost on a daily basis). I think that it is a "fair" request... what do you think???

I just sent my e-mail today and I am waiting for an answer from Tera-byte.

kunal
03-28-2001, 01:42 PM
hmm... why dun u change the way you connect? for example in php, you can use pconnect [ persisten connection ] instead of a simple connect.. this will not open newer connections everytime the script is run, but will re-use the old connection.

easypooltutor
03-28-2001, 02:34 PM
Originally posted by kunal
hmm... why dun u change the way you connect? for example in php, you can use pconnect [ persisten connection ] instead of a simple connect.. this will not open newer connections everytime the script is run, but will re-use the old connection.

Thanks for the tip, I changed all mysql_connect to mysql_pconnect as per your suggestion. Unfortunately, I am unable to test it right now because... (drum roll please)... "Too many connections in ****** on line 6
Can't Connect to Database:" :)

Hopefully, the server will free up this afternoon and I will try to see if your suggestion helped.

vizi
03-28-2001, 02:36 PM
Still, getting to many connections is not good. The mysql server is overloaded. Try sending your host an email and ask them to raise the amount of concurent connections allowed. And also tell them to kill any zombie connections to the database.

jnestor
03-28-2001, 04:38 PM
I had a similar experience with another shared hosting company and am in the process of moving onto my own dedicated machine. I think the short answer is: if you must be able to connect to MySQL you'll need at least a virtual server.

You might contact your host and ask them to monitor who is using all the connections. They can limit the number of connections for any given user but it they're like my old host this would only give one or two per user if they had to guarantee you could get in. MySQL by default only allows something like 90 or 100 connections and the host had at least 40 something users on the machine.

easypooltutor
03-28-2001, 05:34 PM
I have changed back my PHP code to use mysql_connect instead of mysql_pconnect. The code seems to slow down the load time quite a bit. There has to be a better way.

A dedicated server is not an option for me right now because I cannot afford it.

I am still waiting for an answer from my hosts about what they can do to help me with this problem.

kunal
03-29-2001, 12:48 AM
hmmm.. i wonder why it slowed the page load time...

akaize
03-29-2001, 07:26 PM
Looking for a relaiable MySql host that do not give me alwyas error

jic
03-30-2001, 12:41 AM
Just sounds like to me Tera-Byte needs to put you on a different server with less users =/.

James R. Clark II
Nethosters Inc.
http://www.nethosters.com

easypooltutor
03-30-2001, 01:57 AM
Originally posted by jic
Just sounds like to me Tera-Byte needs to put you on a different server with less users =/.

James R. Clark II
Nethosters Inc.
http://www.nethosters.com

That's exactly what I asked them to do... unfortunately, I haven't had any response for almost 2 days now. I sent them another e-mail this afternoon checking the status of my request... so far, still no response.

I thought you guys said Tera-Byte was excellent? :(

MattF
03-30-2001, 06:55 AM
lets have a look at there configuration.

from telnet/ssh type 'more /etc/my.cnf' or is it 'more /etc/my.cfg'. paste it here.

easypooltutor
04-01-2001, 05:28 PM
I have left Tera-byte and went to Ventures Online. My experience with Tera-byte wasn't that bad but I felt that it could have been better (see my first post above).

Someone on this board once said "Past performance isn't indicative of future performance" or something like that. This was true for me. When I found out about webhostingtalk, I asked the people here what hosts are good hosts and Tera-byte always come out as one of the "better" hosts so I signed up with them. Unfortunately, Tera-byte and I started out on the wrong foot.

Perhaps I am the only one not fully satisfied with Tera-byte but I think that customers should not settle for "less than perfect" hosting service. With a lot of "good" hosts out there, we (the customers) have the luxury of expecting the best service from our host and not settling for second best.

To be fair to Tera-byte, they did fix the problem I was having but they left me in the dark for 2 days. I did not know if they were working on my request or ignoring me completely. If other hosting companies CAN respond in less than 24 hours, I don't see why Tera-byte can't do the same.

my 2 cents,

Matt Lightner
04-01-2001, 05:32 PM
Your host should be able to allow for more connections, or time out expired connections by setting the max_connections and wait_timeout variables in their /etc/my.cnf file. For example:

root@server [~]# cat /etc/my.cnf
[mysqld]
set-variable = max_connections=500
set-variable = wait_timeout=10

That will probably solve their max connections problem. Of course, if you're already at Ventures, it doesn't really matter. ;)

Regards,
Matt Lightner
mlightner@site5.com

<EDIT: Looks like they fixed it for you.>