View Full Version : Slow database response
stevetsi
01-23-2006, 09:05 AM
Several of my websites had been slowing down to a crawl over the past few weeks. I though maybe I had some rogue php script using up CPU time on the server, or maybe I sufferred outside SQL injections... but the actual reason was not so exotic at all!
I tried to access my mySQL databases via 1and1's phpmyadmin and almost freaked out when NONE of the tables showed up. At least they did not show up *instantly*. It took almost 2 MINUTES for the tables to populate on my phpmyadmin page. THAT'S WHY MY WEBSITES WERE SO SLOW!
Here's the kicker - not all of the databases were slow to access. One database popped up instantly in phpmyadmin - that's the ONE site that runs just fine.
Ahh! This is so frustrating because there isn't a thing I can do to fix this problem. I emailed 1and1 support already, but that was just last night. Unfortunately, this issue has persisted for weeks!
Here's a funny question: Does 1and1 host this website?
eWebtricity
01-23-2006, 04:09 PM
No this site is not run by 1and1, does the shared hosting account give you access to an SSH command line? Can you tell what the load is on the server?
aldee
01-23-2006, 05:21 PM
No this site is not run by 1and1From all I can see it's at least run from a 1&1 root server ;-).
stevetsi
01-23-2006, 05:25 PM
I do have SSH, but I cannot tell what the server load is, at least I'm not sure HOW to tell. I use a program called linspect which allows me to view all files/directories down to the root directory (but of course limited file modification permissions since I do not actually have root access) I noticed that the server I am has dozens of user accounts on it. I do not think that is what is slowing me down, though. It is specifically the speed at which most of my databases are being served. The most direct way to notice this is to log into phpmyadmin and try to view a database. On all but two databases (out of 7, I think) it takes over a minutes for the tables in the database to populate on the page. There is no confusion here about what the problem is. I just don't think there is anything within my power that I can do to resolve this problem righ now, except to stay away from querying my databases!
eWebtricity
01-23-2006, 10:32 PM
aldee: This site is run on a 1and root III server.
stevetsi: from the SSH command line see if you can run the "top" utility (without quotes of course). If you have permissions then it will run and show you system resource usage. Run top and at the same time perform a query on the database and capture the top stats at the same time and post them here if possible.
stevetsi
01-24-2006, 02:33 PM
[QUOTE=
stevetsi: from the SSH command line see if you can run the "top" utility (without quotes of course). If you have permissions then it will run and show you system resource usage. Run top and at the same time perform a query on the database and capture the top stats at the same time and post them here if possible.[/QUOTE]
I haven't had a chance to run the utility, but I was looking a later post by ryanlwh and the suggestion made to him was to use an external host for the database.
From what I read in his post "lost connection to mysql", it is the exact same issue that I am having.
How do I connect to an external host? I mean, if I had a static IP at home, I would host the database myself... well, maybe not. But does this mean that I actually would have an option to have my database perform better? I mailed a 1and1 support a few days ago, but I have not received a response yet. I'm sure they're getting inundated with emails from other people with the same issue. If it wasn't for the DB issue, I would be extremely satisfied with the service, but it just so happens that nothing I'm working on will actually function if mySQL serving goes down.
BTW: I would be more than glad to be directed to previous posts if the above questions have been answered before. I search through them some more in the meantime.
eWebtricity
01-25-2006, 12:36 AM
ryanlwh was given an external MySQL host to use as part of his package. When you point to your DB host do you use localhost or a real hostname or IP? Maybe a common problem for all shared accts. This the main reason we don't use shared accounts anymore, you can never really rely on the platform to be stable if you really need uptime and stability. For a personal website it's okay but for anything else it's just not the right solution. I would email 1and1 on this one and escalate to a supervisor if you have to. maybe even email admin@1and1.com they seem to be pretty helpful if you can't get anywhere with front line support.
stevetsi
01-25-2006, 09:09 AM
ryanlwh was given an external MySQL host to use as part of his package. When you point to your DB host do you use localhost or a real hostname or IP? Maybe a common problem for all shared accts. This the main reason we don't use shared accounts anymore, you can never really rely on the platform to be stable if you really need uptime and stability. For a personal website it's okay but for anything else it's just not the right solution. I would email 1and1 on this one and escalate to a supervisor if you have to. maybe even email admin@1and1.com they seem to be pretty helpful if you can't get anywhere with front line support.
First off, I want to thank you for your timely responses to my posts. I really appreciate it.
Is my only other option besides using shared account, to use a dedicated server? I don't know if I want to commit to $100+ a month quite yet. My DB host, by the, does use a real host name. Where would the DB actually reside if I used "localhost"? Do you think they have separate servers setup just for databases? Anyway, that's neither here nor there - I paid for the "Developer Plan" (the highest level shared hosting plan) and it's not really living up to it's promise at the moment. I still do not quite understand why only two of my database run quickly and the others are so s-l-o-w. There is almost no activity on any of them right now.
Also, I'm still waiting for a response from 1and1 support (no autoresponder) - 3 days and counting.
C-4 Hosting
01-25-2006, 10:50 AM
Most shared hosting companies have MySQL residing on the same server ( localhost ). 1and1 on the other hand does not ( as you have noticed ). Basically, if you dont want to go to a dedicated server, and want MySQL running on the localhost, the best bet is to find another hosting company. I dont think 1and1 offers anything on shared hosting with a local MySQL... But you can always e-mail / call 1and1 to find out if they do or not :)
stevetsi
01-25-2006, 02:49 PM
I really appreciate the input. I'll try to work with 1and1 to resolve the issue, although I still have not received a response to my email on the matter.
C-4 Hosting
01-25-2006, 02:58 PM
Most e-mails sent to 1and1 take a VERY long time to get answered ( if they get answered at all ). If your looking for a quicker response from them, I would try calling them, and if the low-level tech support guy that answers the phone doesn't give you a satisfactory response/answer to the problem, ask immediately to esculate it to the next level. Either to a supervision or manager! :)
vBulletin® v3.7.0 Beta 4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.