Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

flush-host

Quote Reply
flush-host
hi,
we had a problem with our provider. their server was
knocked out because there were too many connections
and there was an error message which suggested to
flush-hosts. has anyone an idea what the problem could be.
i know one problem was, that we have a program detail.cgi
and i forgot to end the program with
exit;
but i don´t know if this could have caused the problem with
the database. our provider said that he had more than
50 unfinished processes.
any help is appreciated.

cheers
niko

http://www.master-productions.com
Quote Reply
Re: flush-host In reply to
If you do not close processes within scripts, then it would cause a resource usage problem...double check your scripts by running TOP via telnet to see how many process are spawned when you execute the script.

Regards,

Eliot Lee
Quote Reply
Re: flush-host In reply to
Are you running anything modified? The calls that go through DBSQL.pm close the MySQL connections when they are done. I don't know how it all works under mod_perl, because I have not gotten my server set up properly to really test it.

Several people have reported this sort of problem, and I don't remember any concluding messages, but it seemed to be configuration problems (I would guess). I've hit some problems on mysql servers with connections, and the combination may be contributory. One server I work with can only execute one MySQL command at a time from inside mysqlman, or it loses connection with the server, yet it doesn't seem to have problems with Links in and of itself.

I have not figured out any solutions or pattern to it.

PUGDOG®
PUGDOG® Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: flush-host In reply to
Thank you both for your help. I don´t know what exactly caused the problem but it looks like the missing exit; was
one part of it. Since I finished the script there were no
more complaints from our provider. We now have about
700 Visitors a day and most of them call detail.cgi
for example http://www.master-productions.com/...detail.cgi?ID=476832. This script searches for the ID, looks if in the pictures path is an image with the
name id.gif or id.jpg then look in a detailed table if there is a detailed text and then it opens another table and looks if there are products related to the id and then it searches again in the main databese for the information about the related products. but it seems to run stable now.

Cheers
Niko

http://www.master-productions.com
Quote Reply
Re: flush-host In reply to
>> Thank you both for your help. I don´t know what exactly caused the problem but it looks like the missing exit; was

Well.... that will do it!

If your script terminates abnormally, and you are _not_using object calls that clean up after themselves (ie: DBSQL.pm) you can leave a lot of open processes around.

The warnings in the error.log about "Program ended without explicit Disconnect" are not something to ignore.

_USE_ the error.log!! It can warn you of problems early on.

BTW... under mod_perl, you don't use exit, or the script exits, and has to be recompiled, and you lose the performance benefits.

PUGDOG®
PUGDOG® Enterprises, Inc.
FAQ: http://postcards.com/FAQ