Link to home
Start Free TrialLog in
Avatar of RGuillermo
RGuillermoFlag for United States of America

asked on

MYSQL too many connetions error message

Hello Experts,
while our new app is being developed by our provider
we are adjusting our legacy about to retire as much as possible.

I am getting error "odbc too many connections " from MySQL server
why is this?

Maybe is because in each piece of source we open a connection execute a command and close the connection?
Should I have one only connection all the session?

Each time I need to add/update or delete I follow the same steps
that is:

    con1 = SQLCONNECT("connex","root","root")
    R2 = SQLEXEC(con1,v2)
    R4=SQLDISCONNECT(Con1)

Works just fine until the " TOO MANY CONNECTIONS " error message.

What is your advice here?
Regards
ASKER CERTIFIED SOLUTION
Avatar of Prabhin MP
Prabhin MP
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RGuillermo

ASKER

it was set to 151
your advice leads us to find the following...

SET GLOBAL interactive_timeout = 60;
SET GLOBAL wait_timeout = 60;

Now each sleeping connection is being erased by the server after 60secs
so we never reach the max.... this we just learned

Hope we are doing good and has no consequences..
So far .. problem solved !!

Thank you much !!