Too Many Connections error

2001-04-18 Thread Jesse E. Stay II

I'm having a problem, which has occured before, in which I keep getting "Too
Many Connections" Errors in my logs on the web server for MySQL.  I am using
Apache::DBI to connect.  I fixed the problem before by just increasing the
max_connections.  Unfortunately, I am at the max amount of max_connections
(the MySQL docs say that in order to increase it, you have to compile it in
with the code, which I would rather not do.), and I cannot add any more.  If
I switch to just regular DBI, will that solve my problem, or what else could
be causing this problem to occur?  I've got my boss breathing down my neck,
and I'm unsure what answer to give him.

-Jesse Stay


-
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 [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Too Many Connections error

2001-04-18 Thread Jesse E. Stay II

That's weird - my Server will only let me have 210 connections if I set
max_connections to 300, it sets at 210.  If I set it to 500, it still stays
at 210.  Any ideas on how to increase this?

-Original Message-
From: Philip Mak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 3:30 PM
To: Jesse E. Stay II
Cc: [EMAIL PROTECTED]
Subject: Re: "Too Many Connections" error


On Wed, 18 Apr 2001, Jesse E. Stay II wrote:

 I'm having a problem, which has occured before, in which I keep getting
"Too
 Many Connections" Errors in my logs on the web server for MySQL.  I am
using
 Apache::DBI to connect.  I fixed the problem before by just increasing the
 max_connections.  Unfortunately, I am at the max amount of max_connections
 (the MySQL docs say that in order to increase it, you have to compile it
in
 with the code, which I would rather not do.), and I cannot add any more.
If
 I switch to just regular DBI, will that solve my problem, or what else
could
 be causing this problem to occur?  I've got my boss breathing down my
neck,
 and I'm unsure what answer to give him.

Here's some random thoughts:

If you have more Apache processes running than you have maximum
connections (I think the hard maximum is around 1000), then you will run
out of connections.

One thing you could try is setting "MaxClients" in httpd.conf to your
max_connections. This will prevent Apache from spawning too many
processes, but may cause people viewing your website to have to wait
longer.

If you use the normal DBI instead of Apache::DBI, then connections will be
non-persistent and you'll have more to go around, at the cost of slightly
slower website response time.

There might be a problem somewhere that is causing your system to use up
more MySQL connections than it should. 1000 is a lot of connections, and
it shouldn't use that many unless your website is very heavily loaded. (I
had a website that got 3 million page views a month and it fit in 40
simultaneous connections, but it was all static files so queries could be
served quickly.)

-Philip Mak ([EMAIL PROTECTED])


-
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 [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
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 [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




too many connections

2001-01-31 Thread Jesse E. Stay II

I seem to have run into a problem lately where all of the sudden my
server keeps giving me "too many connections" errors, locking anyone out
of the site.  I have set max_connections to 210, which shouldn't matter
anyway because we haven't had any more users than usual accessing the
site.  The only thing that has changed since then is the programming
(using Apache::DBI in Perl to connect).  Does anyone have any ideas what
type of programming errors may be causing this?  I do a mysqladmin
processlist, and it appears that the processes seem to stay right up
around 80, and don't seem to go much below that number - why is that?
Any help would be extremely helpful - my boss is about ready to switch
to Oracle, and I don't want to have to do that by all means.

-Jesse Stay


-
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 [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php