iNET Interactive - Online Advertising Agency
          
FreeWebHostingTalk Forums  
Quick Links
Find a Host » HOST QUOTE | ISPcheck.com
 
 
Go Back   FreeWebHostingTalk > Main Forums > Running A Free Web Hosting Company > As soon as MYSQL is started, HTTPD slows to total halt in 2-4 mins...

Reply
 
Thread Tools
Old 11-14-2006, 11:18 AM   #1
astounding
Member
 
Join Date: Aug 2006
Posts: 41

astounding is offline
Unhappy As soon as MYSQL is started, HTTPD slows to total halt in 2-4 mins...
Hey,

I've been having issues with member hosted sites. Especially during peak traffic, their site becomes slow, eventually to total inaccessibility.

When I restart httpd, their sites go back to normal speed. But then slow down again within 2 minutes. So I pretty much have to restart httpd every 2-5 minutes to keep member sites from running.

But today I found the real cause.

As soon as I stopped MySQL, their sites immediately started working again, and never again slowed down, until I started MYSQL again.

There's no load or memory change while sites slow down or are fast. There's no change in anything at all infact.

All I know is MYSQL (I have v5 installed) is causing this to happen.

But I really can't see how httpd and mysql can be related, and how can MYSQL do this to entire apache.

Can anyone help me on this. What should I do to fix this?

Thanks.
Andre
Reply With Quote
Old 11-14-2006, 11:38 AM   #2
adilbhai
Senior Member
 
Join Date: Oct 2006
Posts: 307

adilbhai is offline
Default
Dear Andre,

Plz check if ur members scripts are making persistant connections to MYSQL using pconnect instead of connect.

persistent connections are only needed very rare and generally all other functionality is possible using normal connect method.

i have no idea where but if u can plz check the number of mysql connections
This should give u an idea or search for scripts containing the php function
mysql_pconnect


------Just for ur info---------
resource mysql_pconnect ( [string server [, string username [, string password [, int client_flags]]]] )


Establishes a persistent connection to a MySQL server.

mysql_pconnect() acts very much like mysql_connect() with two major differences.

First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection.

Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).

This type of link is therefore called 'persistent'.

------end for your info--

And its quite possible that someone is using mysql to store files for eg hivemail uses mysql to store emails of all site users

So also keep an eye on teh size of mysql dbs
__________________
Adil
HostImage : Free Imagehosting
Reply With Quote
Old 11-15-2006, 11:33 AM   #3
gryffin
Senior Member
 
Join Date: Jun 2006
Posts: 201

gryffin is offline
Default
mysql can do this to apache because if DNS is mysql based then if mysql becomes overloaded pages will not load, it is not apache it just appears to be apache, it is named.

just use flatfile instead of mysql for DNS, any tech can do this for $25

per user query limits may help as it may be an abusive user as the post above highlighed, but the above cause is HIGHLY likley
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Advertisement:
 
     
 
 
 

Copyright © 2005-2007, FreeWHT.Com. All Rights Reserved.   Advertise on FreeWHT

Related iNET Interactive Sites:
Web Hosting Talk | Hosting Catalog | Hosting Tech | Hot Scripts

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.