MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jocelyn Fournier Date:August 14 2002 5:36pm
Subject:Re: Persisten Connections
View as plain text  
Hi,

The solution for this problem is to decrease the wait_timeout variable to
something more reasonable than 28800 seconds.
If you have a very loaded server, I thing a wait_timeout of 60s is great (in
my case).
However I hardly understand why in some cases mysql seems to be no able to
reused IDLE connexion (which entails the well known problem of two many
connexion).

Regards,
  Jocelyn
----- Original Message -----
From: "Paul DuBois" <paul@stripped>
To: "Tod Harter" <tharter@stripped>; "Thomas Seifert"
<ts77@stripped>; <mysql@stripped>
Sent: Wednesday, August 14, 2002 7:25 PM
Subject: Re: Persisten Connections


> At 11:14 -0400 8/14/02, Tod Harter wrote:
> >On Wednesday 14 August 2002 09:54 am, Thomas Seifert wrote:
> >
> >I disagree entirely....
> >
> >Persistent connections have little or nothing to do with increasing load!
> >
> >Given that you mention you are using PHP I'll assume you have mod_php
running
> >in Apache. Each Apache child process in this configuration will maintain
ONE
> >open database handle, so 100k pageviews per day I would expect you might
max
> >at like 30k in one hour, or around 10/second, so you might top out at
roughly
> >100 Apache child processes at any one time, thus 100 database
connections.
> >
> >Each DB connection is not a huge overhead, but creating and destroying 10
> >database handles PER SECOND is a large overhead!!! Remember, every time
mysql
> >creates a connection it has to do internal queries on the grant tables. I
> >don't know exactly what the overhead of that is going to be, but ANYTHING
> >that creates 10 queries per second is putting some strain on your
database
> >server!
> >
> >One of the main goals of using Apache modules for scripting was to allow
> >persistent database connections. There is really NO reason to give up
that
> >advantage. Remember, MySQL is multi-threaded, with one thread per
connection,
> >so the resources for a database connection are on the order of under 100k
of
> >memory per connection.
>
> There is at least one reason, which is that persistent connections cause
> the server to hold open connection slots even the connection isn't
actively
> being used at the moment.  This can cause the MySQL server to run out of
> connection slots and result in connections being refused.  Using
non-persistent
> connections under such circumstances can be beneficial because on average,
> the server need hold fewer connections open.
>
> This has been found to solve connection-refused issues in a number of
> cases on this list.
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread117099@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-joc=presence-pc.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>

Thread
Persisten ConnectionsJohn Wards14 Aug
  • Re: Persisten ConnectionsThomas Seifert14 Aug
    • Re: Persisten ConnectionsTod Harter14 Aug
  • Re: Persisten ConnectionsJocelyn Fournier14 Aug
  • Re: Persisten Connectionspeter.brawley14 Aug
  • Re: Persisten ConnectionsJocelyn Fournier14 Aug
  • Re: Persisten ConnectionsStreetWarz & SpeedWarz14 Aug
  • Re: Persisten ConnectionsJocelyn Fournier15 Aug
  • Re: Persisten ConnectionsGelu Gogancea15 Aug
  • Re: Persisten Connectionsmos16 Aug
  • Re: Persisten Connectionsmos17 Aug
Re: Persisten ConnectionsPaul DuBois14 Aug
Re: Persisten ConnectionsThomas Seifert14 Aug
RE: Persisten ConnectionsSteve Orr16 Aug
RE: Persisten ConnectionsSteve Orr16 Aug