Thread: [Phplib-users] SQL: more than 'max_user_connections'
Brought to you by:
nhruby,
richardarcher
From: <so...@gm...> - 2003-02-19 16:27:42
|
hello, I keep getting the following mistake from my site: Warning: User net@localhost has already more than 'max_user_connections' active connections in /home/www/net/phplib_lablue/db_mysql.inc on line 73 Warning: MySQL Connection Failed: User net@localhost has already more than 'max_user_connections' active connections in /home/www/net/phplib_lablue/db_mysql.inc on line 73 Database error: pconnect(localhost, net, $Password) failed. MySQL Error: () Session halted. problem seems to appear with 30 or more users online at the same time. Is this a SQL related problem (bad config) or possibly within PHP? thx, MAREK. |
From: Nathaniel P. <np...@te...> - 2003-02-19 17:26:13
|
I don't run MySQL, but there are two things you might look at: First, check to make sure that you have MySQL configured to accept more than 30 (or whatever) connections. The relavent documentation appears to be here (look for the max_user_connections configuration option): http://www.mysql.com/doc/en/System_Variables.html http://www.mysql.com/doc/en/SET_OPTION.html and possibly here: http://www.mysql.com/doc/en/User_resources.html However, if you don't administer your own database, you'll probably have to talk to your system administrator to be able to change these settings. Second, check to see if there is any PHP configuration options that limit the number of concurrent connections. There is a list of options that can be configured for PHP's MySQL support here (you can find out what these options are set to on your server with the phpinfo() function): http://www.php.net/manual/en/ref.mysql.php Hope this helps... _________________________________ Nathaniel Price <np...@te...> Webmaster ----- Original Message ----- From: <so...@gm...> To: <php...@li...> Sent: Wednesday, February 19, 2003 8:27 AM Subject: [Phplib-users] SQL: more than 'max_user_connections' > hello, > > I keep getting the following mistake from my site: > > > Warning: User net@localhost has already more than 'max_user_connections' > active connections in /home/www/net/phplib_lablue/db_mysql.inc on line 73 > > Warning: MySQL Connection Failed: User net@localhost has already more > than 'max_user_connections' active connections in > /home/www/net/phplib_lablue/db_mysql.inc on line 73 > Database error: pconnect(localhost, net, $Password) failed. > MySQL Error: () > Session halted. > > > problem seems to appear with 30 or more users online at the same time. > > Is this a SQL related problem (bad config) or possibly within PHP? p |
From: Lindsay H. <fmo...@fm...> - 2003-02-20 03:01:38
|
Thus spake so...@gm... on Wed, Feb 19, 2003 at 10:27:31AM CST > hello, > > I keep getting the following mistake from my site: > > > Warning: User net@localhost has already more than 'max_user_connections' > active connections in /home/www/net/phplib_lablue/db_mysql.inc on line 73 > > Warning: MySQL Connection Failed: User net@localhost has already more > than 'max_user_connections' active connections in > /home/www/net/phplib_lablue/db_mysql.inc on line 73 > Database error: pconnect(localhost, net, $Password) failed. > MySQL Error: () > Session halted. This is a mysql issue. You can change max_user_connections in your my.cnf file. Do a locate for it on your system. This is often set to 0 (no limit) but may be set to a specific value which is too low for your situation. You can see the current setting by logging in to mysql with the mysql client and giving the 'show variables;' command. To set max_user_connections, edit my.cnf and under the [mysqld] section, put the following line. set-variable = max_user_connections=0 Restart the mysql server and the problem should go away. This assumes that you administer your own server. If not, you'll need to get the server admins to take care of the issue. -- Lindsay Haisley | "Everything works | PGP public key FMP Computer Services | if you let it" | available at 512-259-1190 | (The Roadie) | <http://www.fmp.com/pubkeys> http://www.fmp.com | | |
From: Peter C. <li...@kr...> - 2003-02-20 19:05:11
|
Hi To maybe help answer a future FAQs about this, I've put a quick note about the latest version of db_mysql and the mysql_connect() workaround in: http://www.sanisoft.com/phplib/manual/DB_sql.php Peter At 13:16 20/02/03 +0100, Giancarlo wrote: >You have to lower the mysql wait_timeout value from the default 8 h to 1-5 minutes mas, so stale persistent connections will be freed >This is a FAQ. > >Gian > >Lindsay Haisley wrote: >>Thus spake so...@gm... on Wed, Feb 19, 2003 at 10:27:31AM CST >> >>>hello, >>> >>>I keep getting the following mistake from my site: >>> >>> >>>Warning: User net@localhost has already more than 'max_user_connections' >>>active connections in /home/www/net/phplib_lablue/db_mysql.inc on line 73 >>> >>>Warning: MySQL Connection Failed: User net@localhost has already more >>>than 'max_user_connections' active connections in >>>/home/www/net/phplib_lablue/db_mysql.inc on line 73 >>>Database error: pconnect(localhost, net, $Password) failed. >>>MySQL Error: () >>>Session halted. >> >>This is a mysql issue. You can change max_user_connections in your my.cnf >>file. Do a locate for it on your system. This is often set to 0 (no limit) >>but may be set to a specific value which is too low for your situation. You >>can see the current setting by logging in to mysql with the mysql client and >>giving the 'show variables;' command. >>To set max_user_connections, edit my.cnf and under the [mysqld] section, put >>the following line. >>set-variable = max_user_connections=0 >> >>Restart the mysql server and the problem should go away. >>This assumes that you administer your own server. If not, you'll need to >>get the server admins to take care of the issue. |
From: Marek S. <so...@gm...> - 2003-02-20 21:27:56
|
> To maybe help answer a future FAQs about this, I've put a quick note = about the latest version of db_mysql and > the mysql_connect() workaround in: = http://www.sanisoft.com/phplib/manual/DB_sql.php ok, this is a good idea. I will update phplib (db_mysql). Is the Version 7.4-pre2 stable enought to install? thx MAREK. |
From: Giancarlo <gia...@na...> - 2003-02-20 12:16:40
|
You have to lower the mysql wait_timeout value from the default 8 h to 1-5 minutes mas, so stale persistent connections will be freed This is a FAQ. Gian Lindsay Haisley wrote: > Thus spake so...@gm... on Wed, Feb 19, 2003 at 10:27:31AM CST > >>hello, >> >>I keep getting the following mistake from my site: >> >> >>Warning: User net@localhost has already more than 'max_user_connections' >>active connections in /home/www/net/phplib_lablue/db_mysql.inc on line 73 >> >>Warning: MySQL Connection Failed: User net@localhost has already more >>than 'max_user_connections' active connections in >>/home/www/net/phplib_lablue/db_mysql.inc on line 73 >>Database error: pconnect(localhost, net, $Password) failed. >>MySQL Error: () >>Session halted. > > > This is a mysql issue. You can change max_user_connections in your my.cnf > file. Do a locate for it on your system. This is often set to 0 (no limit) > but may be set to a specific value which is too low for your situation. You > can see the current setting by logging in to mysql with the mysql client and > giving the 'show variables;' command. > > To set max_user_connections, edit my.cnf and under the [mysqld] section, put > the following line. > > set-variable = max_user_connections=0 > > Restart the mysql server and the problem should go away. > > This assumes that you administer your own server. If not, you'll need to > get the server admins to take care of the issue. > |
From: <so...@gm...> - 2003-02-20 15:23:58
|
> You have to lower the mysql wait_timeout value from the default 8 h to > 1-5 minutes mas, so stale persistent connections will be freed on my server persistent connections are impossible > This is a mysql issue. You can change max_user_connections in your > my.cnf file. Do a locate for it on your system. This is often set > to 0 (no limit) but may be set to a specific value which is too low > for your situation. max_user_connections is set to 0 (no limit) can I change someting in my PHP Scripts? (close DB) thx, MAREK. |
From: Lindsay H. <fm...@fm...> - 2003-02-20 17:26:03
|
Thus spake so...@gm... on Thu, Feb 20, 2003 at 09:23:46AM CST > > You have to lower the mysql wait_timeout value from the default 8 h to > > 1-5 minutes mas, so stale persistent connections will be freed > > on my server persistent connections are impossible > > > This is a mysql issue. You can change max_user_connections in your > > my.cnf file. Do a locate for it on your system. This is often set > > to 0 (no limit) but may be set to a specific value which is too low > > for your situation. > > max_user_connections is set to 0 (no limit) Hmmm. This smells like a bug. You might try setting max_user_connections to something extremely large, like 1000, and see if this helps. > can I change someting in my PHP Scripts? (close DB) using connect() rather than pconnect() might help, but isn't this hard-coded into the phplib database object scripts? Lowering the wait_timeout for pconnect() might also help, but if mysql isn't honoring the max_user_connections setting then who knows. If your server isn't setting up persistent connections on a pconnect call then this might not help. -- Lindsay Haisley | "Everything works | PGP public key FMP Computer Services | if you let it" | available at 512-259-1190 | (The Roadie) | <http://www.fmp.com/pubkeys> http://www.fmp.com | | |
From: Richard A. <rh...@ju...> - 2003-02-20 20:56:55
|
At 13:16 +0100 20/2/03, Giancarlo wrote: >You have to lower the mysql wait_timeout value from the default 8 h to >1-5 minutes mas, so stale persistent connections will be freed I vote for this solution too. Worked like a charm for me. set-variable = wait_timeout=60 ...R. |