Server Overload problem

Get general support for ADP here.

Moderator: pgolovko

Server Overload problem

Postby bihlink » 07/23/2007 12:14 am

Hi folks. After some time using ADP i have warning that my account could be suspended due to heavy CPU overload. I received email which say that my adp mysql is running 24 hours a day and keep open...
I looked into script files and couldn't find any mysql_close(); :scratch:
so what to do? I have tried to add some but it still going bad and i'm not sure what i'm missing. Is there any quick advice before i get banned ???
bihlink
 
Posts: 67
Joined: 05/08/2007 1:53 am


Postby pgolovko » 07/23/2007 12:58 am

ADP uses a "persistent" database connection: http://www.php.net/manual/en/function.m ... onnect.php
Quick advice? Things dont happen by themselves :study: Turn off any ADP cron jobs, and reverse any last changes you've done to the code, and then investigate what has caused the problem.
__________________
Best regards,
Pavel Golovko
User avatar
pgolovko
 
Posts: 494
Joined: 03/25/2006 1:23 am
Location: Somewhere on planet Earth ....

Postby bihlink » 07/23/2007 1:17 am

ok i'm trying my best, but isn't "persistent" connection too bad itself for problems like this? As i can see on the link you provided it keep mysql open 24/7 so it doesn't sound to me that problem will be solved by reversing mysql_close(). I don't really understand this part. And also which way i can investigate what is cosing problem? I'd like to know that part too (for future).
And also to say that i tried before to use cronjob but it didn't work for me because i didn't know right commands to use it, so i erase all cronjobs long ago...
bihlink
 
Posts: 67
Joined: 05/08/2007 1:53 am

Postby pgolovko » 07/23/2007 5:15 am

"persistent" connection will stay open for as long as the script needs to fetch data from your database. Try the following query in your MySQL database to free up some resources:
Code: Select all
FLUSH USER_RESOURCES

info: http://dev.mysql.com/doc/refman/4.1/en/flush.html

Also, you can view some basic database stats from your phpMyAdmin. See if there anything suspecious.

If you really has not done any changes to ADP code, and these problems just came out of no where, then ask your server admin if they have upgraded anythng recently, or ran any back ups, server tests, etc.
__________________
Best regards,
Pavel Golovko
User avatar
pgolovko
 
Posts: 494
Joined: 03/25/2006 1:23 am
Location: Somewhere on planet Earth ....

Postby bihlink » 07/24/2007 12:08 am

I couldn't use flush command, do not have reload privileges. Also all processes were killed yesterday and my database was switched off and server was still slow, so i must find where the problem is. Obviously it's not ADP that coses this problem but then i'm not sure what tell them that this script was cosing so much overload. I'm trying to monitor all processes in phpMyAdmin and now all look ok even when i use crawling. So i have more homework to do and leave ADP as is... Thank you for advice anyway.
bihlink
 
Posts: 67
Joined: 05/08/2007 1:53 am

Persistant Connections?

Postby tezza42 » 08/02/2007 2:36 pm

I have read the links above with regards to persistant connections plus a few more... Now I am worried!
Can anyone clear this up?
Are persistant connections a better choice for the ADP script if it has a very large database of catagories and links and gets thousands of visitors a day?
Would DMOZ use persistant connections on their server?

I am at a loss as to whether to use persistant or change to non persistant.
tezza42
 
Posts: 17
Joined: 08/02/2007 8:22 am

Postby bihlink » 08/03/2007 12:08 am

Did you read them all? At first i thought that persistent connection is bad idea and i was suspicious. But after all readings i see it's not. There is some risks but with careful programing everything is ok.
I couldn't solve my problem because server maintainer didn't do right thing for me and probably not so experienced, so he make everything wrong and server crushed completely. I was lucky to have my backup updated.
Now i moved to my own dedicated server and fix interactive_timeout to 10 (instead of 28 800) and everything working so fast and smooth without one single sleeping connection 24/7!!! It's not just because i'm on dedicated server but it's how the server is setup. So, after all ADP and persistent connection WAS NOT PROBLEM.
bihlink
 
Posts: 67
Joined: 05/08/2007 1:53 am

Relief

Postby tezza42 » 08/03/2007 2:53 am

That's a relief!

I am on a shared server at Hostgator with cpanel and have been with them for a couple of years and can't complain.

Cheers for the reply!
tezza42
 
Posts: 17
Joined: 08/02/2007 8:22 am

Postby pgolovko » 08/03/2007 4:44 am

bihlink wrote:I couldn't solve my problem because server maintainer didn't do right thing for me and probably not so experienced, so he make everything wrong and server crushed completely.

I've suspected that. Glad you've got everything sorted out.
__________________
Best regards,
Pavel Golovko
User avatar
pgolovko
 
Posts: 494
Joined: 03/25/2006 1:23 am
Location: Somewhere on planet Earth ....

Postby wouterkloos » 11/12/2007 3:41 am

If you're worried about persistant connections, wouldn't using static pages be a solution? If I'm correct static pages don't connect to the database at all and visitors will be served all information straight from the HTML file. Correct me if I'm wrong :drunken:
wouterkloos
 
Posts: 9
Joined: 11/11/2007 8:14 pm

Postby bihlink » 11/12/2007 10:32 pm

wouterkloos wrote:If you're worried about persistant connections, wouldn't using static pages be a solution? If I'm correct static pages don't connect to the database at all and visitors will be served all information straight from the HTML file. Correct me if I'm wrong :drunken:

I was using static pages! But even then you have connections to mysql, trough search, admin panel, crawling... Anyway, all the problem was badly maintained server, guys were unexperienced and didn't know to set it up properly.
After all, for building any serious search engine i suggest dedicated server!
bihlink
 
Posts: 67
Joined: 05/08/2007 1:53 am



Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron