[prev in list] [next in list] [prev in thread] [next in thread]
List: phorum-dev
Subject: [phorum-dev] Re: [phorum] PHP pconnect() vs MySQL again
From: "Brian Moon" <brian () phorum ! org>
Date: 2000-07-24 14:54:04
[Download RAW message or body]
I am afraid that your needs are beyond what we can help you with. There are
hundreds of people running Phorum on systems similar to yours without your
problem.
Brian Moon
--------------------------------------------------------------
Phorum Dev Team - http://phorum.org
Making better forums with PHP
--------------------------------------------------------------
----- Original Message -----
From: <mike@taz3.hyperreal.org>
To: <phorum-dev@lists.phorum.org>
Cc: <phorum@lists.phorum.org>
Sent: Sunday, July 23, 2000 3:37 AM
Subject: [phorum] PHP pconnect() vs MySQL again
> Every time someone asks about the "too many connections" error, the
standard
> response is "tune MySQL and your web server". Well, I've done that --
>
> I start mysqld with the --set-variable wait_timeout=whatever option, where
> whatever is less than or equal to the Apache server's Timeout value as set
in
> httpd.conf.
>
> This makes absolutely *no* difference; all the database connections hang
> around and refuse to die.
>
> 'mysqladmin processlist'
> (plus -u and -p args for authentication)
>
> shows connections lasting thousands of seconds, and eventually these max
out
> the server and it starts rejecting connections.
>
> During the diagnosis we figured out that it wasn't only phorum's
connections
> hanging around. There was also a PHP script that someone else was using
that
> contained mysql_pconnect() and also demonstrated the same problem. When
these
> scripts were changed to use mysql_connect(), and audited to make sure they
> always used mysql_close() before exiting, there were no more processes
> lingering around. Is this what I have to do for phorum, too? If so, why is
it
> not happening to everybody?
>
> This is on FreeBSD 4.0-STABLE with
> Apache 1.3.13-dev
> PHP 4.0.1pl2
> MySQL 3.22.32
> Phorum 3.1.2
>
> All the installations are pretty much defaults. I set Timeout for Apache
down
> to 120, which is still pretty generous. For PHP, there is no php.ini, but
> there is a sample file that probably reflects some defaults:
>
> mysql.allow_persistent = On ; allow or prevent persistent link
> mysql.max_persistent = -1 ; maximum number of persistent
links. -1 means no limit
> mysql.max_links = -1 ; maximum number of links
(persistent+non persistent). -1 means no limit
>
> I'm not sure if these really need to be pfutzed with though.
>
> It's possible that this is a lower level problem with PHP 4 on FreeBSD 4.
If
> anyone has any further information or suggestions, please let me
> know. Thanks.
>
> -Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phorum-unsubscribe@lists.phorum.org
> For additional commands, e-mail: phorum-help@lists.phorum.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: phorum-dev-unsubscribe@lists.phorum.org
For additional commands, e-mail: phorum-dev-help@lists.phorum.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic