Groups > Novell > MySQL with Novell > =?ISO-8859-8-i?B?4fLw6envOiBSZTogRFc4K1BIUCtNeVNRTCAtIFRvbyBt?=




DW8+PHP+MySQL - Too many connections - newbie

DW8+PHP+MySQL - Too many connections - newbie
Sun, 05 Mar 2006 11:07:39 GMT
Hi!

Server system SBS (Novell Small Business suite) 6.5 sp 1 with MySQL ver. 
4.0.15a, PHP 4.2.3, all of them on same machine.

Using DW 8.0 (Studio8), from time to time, in different circumstances, during
developing new PHP pages, I'm receiving the "Too many connections"
message.

I'm solving it by restarting the server. Can anyone help me resolve the problem
in a more "civilizable" way?

TIA

Nanu
Post Reply
Re: DW8+PHP+MySQL - Too many connections - newbie
Sun, 05 Mar 2006 19:04:21 GMT
Hi,


> Using DW 8.0 (Studio8), from time to time, in different circumstances,
during developing new PHP pages, I'm receiving the "Too many
connections"
message.
>
> I'm solving it by restarting the server. Can anyone help me resolve the
problem in a more "civilizable" way?
>


Be sure your php code is explicitly calling mysql_close() on each connection
after it's done.  Then, avoid using persistent connections
if possible.  Lastly, decrease the wait_timeout variable of mysql.

in your /etc/my.cnf file do this:

[mysqld]
wait_timeout=30
max_connections0

The server will terminate unresponsive connections after 30 seconds idle
time (instead of 8 hours). Also, if you expect only a few connections
concurrently, then set the max_connections appropriately.

Regards,
deva

Post Reply
=?ISO-8859-8-i?B?4fLw6envOiBSZTogRFc4K1BIUCtNeVNRTCAtIFRvbyBt?=
Mon, 06 Mar 2006 05:34:51 GMT
Thanks!

I searched for the "/etc/my.cnf" file. 
The only files i found are: my.cnf.org, my.cnf.upg and mycnf.bak. No one of them
contain the lines:
[mysqld]
wait_timeout=30
max_connections0

I never accessed the my.cnf file manually. 
For administration I.m using: MySQL Administrator ver. 1.1.2.

TIA

Nanu


>>> deva<shane@absamail.co.za> 05/03/2006 21:04:21 >>>
Hi,


> Using DW 8.0 (Studio8), from time to time, in different circumstances,
during developing new PHP pages, I'm receiving the "Too many
connections"
message.
>
> I'm solving it by restarting the server. Can anyone help me resolve the
problem in a more "civilizable" way?
>


Be sure your php code is explicitly calling mysql_close() on each connection
after it's done.  Then, avoid using persistent connections
if possible.  Lastly, decrease the wait_timeout variable of mysql.

in your /etc/my.cnf file do this:

[mysqld]
wait_timeout=30
max_connections0

The server will terminate unresponsive connections after 30 seconds idle
time (instead of 8 hours). Also, if you expect only a few connections
concurrently, then set the max_connections appropriately.

Regards,
deva




Post Reply
=?UTF-8?B?15HXoteg15nXmdefOiBSZTogRFc4K1BIUCtNeVNRTCAtIFRvbyA=?=
Mon, 06 Mar 2006 22:36:41 GMT
create a blank text file under sys:/etc called my.cnf and put the apropriate
settings in it.  restart your server and voila.. it should read the settings
and implement them.

Rod

>>> On March 5, 2006 at 11:34:51 PM, in message
<%RPOf.4123$oh5.215@prv-forum2.provo.novell.com>, Nanu
Kalmanovitz<nanu@kalmanovitz.co.il> wrote:
> Thanks!
> 
> I searched for the "/etc/my.cnf" file. 
> The only files i found are: my.cnf.org, my.cnf.upg and mycnf.bak. No one 
> of them contain the lines:
> [mysqld]
> wait_timeout=30
> max_connections0
> 
> I never accessed the my.cnf file manually. 
> For administration I.m using: MySQL Administrator ver. 1.1.2.
> 
> TIA
> 
> Nanu
> 
> 
>>>> deva<shane@absamail.co.za> 05/03/2006 21:04:21
>>>
> Hi,
> 
> 
>> Using DW 8.0 (Studio8), from time to time, in different circumstances,
> during developing new PHP pages, I'm receiving the "Too many 
> connections"
> message.
>>
>> I'm solving it by restarting the server. Can anyone help me resolve
the
> problem in a more "civilizable" way?
>>
> 
> 
> Be sure your php code is explicitly calling mysql_close() on each 
> connection
> after it's done.  Then, avoid using persistent connections
> if possible.  Lastly, decrease the wait_timeout variable of mysql.
> 
> in your /etc/my.cnf file do this:
> 
> [mysqld]
> wait_timeout=30
> max_connections0
> 
> The server will terminate unresponsive connections after 30 seconds idle
> time (instead of 8 hours). Also, if you expect only a few connections
> concurrently, then set the max_connections appropriately.
> 
> Regards,
Post Reply
=?ISO-8859-8-i?B?4fLw6envOiBSZTogRFc4K1BIUCtNeVNRTCAtIFRvbyBt?=
Tue, 07 Mar 2006 06:30:46 GMT
Thanks!

Is any need for other commands, parameters or only the:
[mysqld]
wait_timeout=30
max_connections0

TIA

Nanu

>>> Rodney Crossman<rodc@ravenetcomputers.com> 07/03/2006
00:36:41 >>>

create a blank text file under sys:/etc called my.cnf and put the apropriate
settings in it.  restart your server and voila.. it should read the settings
and implement them.

Rod

>>> On March 5, 2006 at 11:34:51 PM, in message
<%RPOf.4123$oh5.215@prv-forum2.provo.novell.com>, Nanu
Kalmanovitz<nanu@kalmanovitz.co.il> wrote:
> Thanks!
> 
> I searched for the "/etc/my.cnf" file. 
> The only files i found are: my.cnf.org, my.cnf.upg and mycnf.bak. No one 
> of them contain the lines:
> [mysqld]
> wait_timeout=30
> max_connections0
> 
> I never accessed the my.cnf file manually. 
> For administration I.m using: MySQL Administrator ver. 1.1.2.
> 
> TIA
> 
> Nanu
> 
> 
>>>> deva<shane@absamail.co.za> 05/03/2006 21:04:21
>>>
> Hi,
> 
> 
>> Using DW 8.0 (Studio8), from time to time, in different circumstances,
> during developing new PHP pages, I'm receiving the "Too many 
> connections"
> message.
>>
>> I'm solving it by restarting the server. Can anyone help me resolve
the
> problem in a more "civilizable" way?
>>
> 
> 
> Be sure your php code is explicitly calling mysql_close() on each 
> connection
> after it's done.  Then, avoid using persistent connections
> if possible.  Lastly, decrease the wait_timeout variable of mysql.
> 
> in your /etc/my.cnf file do this:
> 
> [mysqld]
> wait_timeout=30
> max_connections0
> 
> The server will terminate unresponsive connections after 30 seconds idle
> time (instead of 8 hours). Also, if you expect only a few connections
> concurrently, then set the max_connections appropriately.
> 
> Regards,
> deva
Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact