UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> To Many Connections    
 
   
ordnance1
post Sep 28 2015, 08:41 AM
Post#1



Posts: 480
Joined: 7-May 11



I have a Mysql database I have created for storing my weather station date, currently about 2.5 million rows.

I am the sole user of the database but am getting a To Many Connections error. Following some ideas I found on line I have set allowed connections to 5000, but this did not solve the problem. I have batch file that runs every 5 seconds that imports data to my main table and I suspect that that might be the cause of the problem.

So looking to the experts to ask if 1. is it possible that infact could be my problem 2. if it is any thoughts as to what I can do to solve it or 3. if I am off base with my theory, maybe an idea where I might look next.
Go to the top of the page
 
JonSmith
post Sep 28 2015, 08:44 AM
Post#2



Posts: 3,158
Joined: 19-October 10



You aren't giving us much to go on but I'd hazard that you are having issues around some code you are running.
If you open a connection in code and don't explicitly close it then that connection can remain open. The result is lots of connections you aren't aware of.

Check any code that opens a connection.
Go to the top of the page
 
GroverParkGeorge
post Sep 28 2015, 09:37 AM
Post#3


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


"I have batch file that runs every 5 seconds that imports data to my main table and I suspect that that might be the cause of the problem."

Quite likely.

If that process has to open a new connection each time it runs, and doesn't close it, or if it hasn't finished when the next run kicks off, then that could well be the problem.

Make sure you close any open connections explicitly after they run.
Go to the top of the page
 
datAdrenaline
post Sep 28 2015, 06:33 PM
Post#4


UtterAccess Editor
Posts: 17,929
Joined: 4-December 03
From: Northern Virginia, USA


Stepping back a bit ... I often ask "Why import the data?" .. so ... Iam asking smile.gif (not that you really have to justify it), but ... with such a rapid interval, it seems you would just want to link to your source tables and work with them directly since you want up to date information. If you want read only, then you can create Query objects to do that.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 01:40 AM