AW: Too many connections

2004-03-04 Thread Freddie Sorensen
Randy

Thanks but I am not really sure where the connections are kept alive or
'asleep'

I am quite sure that I am closing my objects, setting them to nothing and
disposing them in my script (actually, ASP.NET is not relly script) but I
don't know if IIS is keeping the connection objects in the connection pool,
if the .NET garbage collector needs to dispose them or if MySQL keeps them
in sleep mode. I didn't have this problem when both services were running on
the same machine, only after I separated them.

In the MyINI file you can alse set the timeout for sleep connections, by
default it is 28800 seconds. I tried to redûce it to 5 seconds, and BOOM -
it smashed my MySQL service

I am really very confused about where the cause of the problem is. Finding
this out would maybe help finding a solution

Any thoughts or experiences, anybody ?

Freddie

-Ursprüngliche Nachricht-
Von: Randy Clamons [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 3. März 2004 22:05
An: Freddie Sorensen; [EMAIL PROTECTED]
Betreff: Re: Too many connections

Freddie,

Try tuning startup parameters in my.ini or my.cnf. The default value for
max_connections is 100. That's a lot for a web site with a single server.

If max_connections is set in my.ini (or my.cnf) to a low number, try a
larger value. If max_connections is not set, your connections are staying
open. Make sure your scripts are closing your connections.

If none of this works for you, try tuning the memory parameters to get
better performance from mysqld.

Randy Clamons
Astro-auction.com

At 09:15 PM 03/03/2004 +0100, Freddie Sorensen wrote:
Hi,

I am using MySQL 4.1.1 as backend for an ASP.NET webapplication using 
the provider from ByteFX.

Until now, IIS and MySQL were running on the same machine and now I 
have moved the webserver to another machine.

Now I start getting 'Too many connections' errors from the MySQL server.
This did not happen before when I was connecting to localhost

Anybody knows why this starts happening now and what I can do to solve it ?

Thanks in advance
Freddie




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: AW: Too many connections

2004-03-04 Thread Sasha Pachev
Freddie Sorensen wrote:
Randy

Thanks but I am not really sure where the connections are kept alive or
'asleep'
I am quite sure that I am closing my objects, setting them to nothing and
disposing them in my script (actually, ASP.NET is not relly script) but I
don't know if IIS is keeping the connection objects in the connection pool,
if the .NET garbage collector needs to dispose them or if MySQL keeps them
in sleep mode. I didn't have this problem when both services were running on
the same machine, only after I separated them.
In the MyINI file you can alse set the timeout for sleep connections, by
default it is 28800 seconds. I tried to redûce it to 5 seconds, and BOOM -
it smashed my MySQL service
I am really very confused about where the cause of the problem is. Finding
this out would maybe help finding a solution
Any thoughts or experiences, anybody ?

Freddie

-Ursprüngliche Nachricht-
Von: Randy Clamons [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 3. März 2004 22:05
An: Freddie Sorensen; [EMAIL PROTECTED]
Betreff: Re: Too many connections

Freddie,

Try tuning startup parameters in my.ini or my.cnf. The default value for
max_connections is 100. That's a lot for a web site with a single server.
If max_connections is set in my.ini (or my.cnf) to a low number, try a
larger value. If max_connections is not set, your connections are staying
open. Make sure your scripts are closing your connections.
If none of this works for you, try tuning the memory parameters to get
better performance from mysqld.
Randy Clamons
Astro-auction.com
At 09:15 PM 03/03/2004 +0100, Freddie Sorensen wrote:

Hi,

I am using MySQL 4.1.1 as backend for an ASP.NET webapplication using 
the provider from ByteFX.

Until now, IIS and MySQL were running on the same machine and now I 
have moved the webserver to another machine.

Now I start getting 'Too many connections' errors from the MySQL server.
This did not happen before when I was connecting to localhost
Anybody knows why this starts happening now and what I can do to solve it ?
Is there an option to disable persistent connections and avoid pooling 
altogether? If yes, turn it on.

Otherwise, set wait_timeout to some compromise value, eg. 100.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]