|
I keep getting the famous 'Too Many Connection' Error, and don't know
how to change my variables, so they persist even if i have to restart
mysql service.
Platform: Windows 2003 Server
My Program is a WebApplication that is written in VB.Net
Using ODBC and OLEDB to connect <- (don't blame me, i just took this
over)
From what i have read so far, the problem is that i need to change
some settings to prevent my connections from being open for the
default of 8 hours.
So I am trying to change the following setting once and for all to:
max_connections=300
wait_timeout=2
(I'm not 100% sure that this is enough, but i guess i have to play
with these settings to find the right balance. We currently only have
about 400 Hits per day. Each Page is making about 1-4 calls to the
MySQL DB)
Now, if i restart the MySql Service, I don't want to have change this
again through script or whatever. I already changed the values
(actually added them) to the my.ini file, and i could not find a
my.cnf file at all.
So, is there one place that i can make this change for good? or is
there a certain syntax that i need to use? Could you please give me
some high-level instructions?
What i do know: --------------------------------------------------------------
-I do know that i would need to log on as root, and make this change.
-I do know that the service reads its values from my.ini - and
supposedly uses any overrides from a my.cnf file. (I was not able to
find the my.cnf file)
-I do have the latest (4.0) version of MySql on the server.
What i tried already:
1. I added 2 lines to the my.ini file
max_connections=300
wait_timeout=2
2. I logged on as root and ran:
SET GLOBAL max_connections=300
SET GLOBAL wait_timeout=2
Then i ran the mysqladmin.exe and created the Report of the variables:
The Report states that i got
max_connections 100
wait_timeout 28800
(Grrr!)
Also, I cannot make drastic programming or connection changes in code
because i am in the process to move the data layer over to SQL Server
2000.
Sorry for being ignorant here, i have taken this project over and am
no expert on mysql.
Please help if you have any basic instructions. |