RE: Persisten Connection

2003-04-04 Thread Adam Erickson
> We have a perl cgi program that refreshes every 45 seconds and connects
> to a mysql database to update records, overtime. This could have 300

Cache the page for 45 seconds.  Subsequent hits see the output from the 1st
request and do not require a DB connection.  Release the cache after 45
seconds to use the refreshed DB data.

> people using this same process, because we are queuing user in the
> database and when they reach queue position 1 and the resources are low,
> they are redirected to a web login page.  Is there a way to keep one

Not sure what you mean here but if this requires a DB hit then caching is
less of an option.  Although, you would still gain performance by not
re-querying the same thing over and over.

> persistent connection to the database so that it does have to connection
> every time in this perl program, because I believe this is causing a
> load on our UNIX box.

mod_perl is for you.  CGI cannot do persistent connections.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Persisten Connection

2003-04-04 Thread gerald_clark
If the perl program is a daemon, than it can keep the connection open.
If you are running the same perl program many times, it will have to 
make the connection each time.

Kory Wheatley wrote:

We have a perl cgi program that refreshes every 45 seconds and 
connects to a mysql database to update records, overtime. This could 
have 300 people using this same process, because we are queuing user 
in the database and when they reach queue position 1 and the resources 
are low, they are redirected to a web login page.  Is there a way to 
keep one persistent connection to the database so that it does have to 
connection every time in this perl program, because I believe this is 
causing a load on our UNIX box.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]