Re: TOO MANY CONNECTIONS!!

From: Date: Thu, 24 Oct 2002 20:14:26 +0000
Subject: Re: TOO MANY CONNECTIONS!!
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-22674@lists.php.net to get a copy of this message
Yeah, sometimes I open and close 2 or 3 permanent connections in one page. I knida have to as each page is made up of a few different include files, and if I dont do seperate connections, it mightnt work. I'll recode my site to cache everything except search pages, or can I even cache these as well?? "Duncan Hill" <dhill@cricalix.net> wrote in message news:20021023222841.GD30375@bajan.cricalix.net... > On Wed, Oct 23, 2002 at 10:18:07PM +0100, Georgie Casey wrote: > > Im getting a too many connections error in my PHP pages at > > http://www.free-ringtones.tv. I presume this is from the > > MySQL server, and I > > know I access the database a lot for each page. So whats the solution to > > MySQL has a default of either 50 or 100 concurrent connections. Exceed it > and you'll get that error. That parameter is configurable - if you run the > MySQL daemon itself. If you use shared hosting, you may not be able to > tweak it. > > Do the pages -need- to be totally dynamic, or can you use the caching system > you mentioned? If so, then wrap code that stats an HTML page for the time, > and if it's too old, update it. Be sure to use file locking so you don't > clobber yourself. > > Moreover, do you open one connection and re-use it in a page, or do you do > multiple opens and closes?

« previous php.db (#22674) next »