-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql too many connections/looses connection #982
Comments
One connection is reserved for the MySQL database administrator (root). Please check SHOW PROCESSLIST to see how many are connected to your piwik database. I can only speculate at this point that the number of visitors or actions has increased, and that this is contributing to the load on your mysql server, but there may be contributing factors:
If you're getting hit by smart bots (eg bing or googlebot), we can change things a bit to defer the creation of the tracker database object. |
The number of users increased indeed heavily today. The connections to the piwikdb steadily increased unil 192, where the max connections was hit (set to 200). Rest was used by root and the page itself.
I do not think that we got hit by bots, this where real users. Might it be (just guessing) that the tables are locked when inserting rows and SElECT-Processes are waiting for end of lock, but the next insert locks again and therefore the number of connections is rising? You use MyIsam, which locks the whole table, not just the row it is inserting. Perhaps InnoDb is a better choice for this table? |
how many pages per day are you seeing on your Piwik? what is the hardware of your piwik server? Recording data in real time the way Piwik is doing currently is a known bottleneck, it can only handle a certain traffic. Can you paste the output of a SHOW FULL PROCESSLIST; ? One thing you can try is the suggestion in the piwik-hackers post: http://lists.piwik.org/pipermail/piwik-hackers/2009-August/000797.html To move to a more scalable Piwik, a solution would be to batch load data in the log tables. This has various other requirements like: server side cookie data store #409. |
We had 350k pages per day on a osx server quad-core 3GHz with 16GB DDR2. CPU was busy but not under highest load. Output of the proceslist gave said 192 processes with similar queries like quoted above, waiting for better times. I can't give you the original output, as the server is now not so busy anymore and the problem therefore doesn't occour at the moment. In some days we have again such a peak. I applied your index-suggestion, we'll see. Perhaps I can convince my boss to give piwik a try in this peak, but it doesn't sound like it... perhaps we just hit the bottleneck. How's the progress towards 0.5? |
with recent 0.4.3 piwik hangs with following error in error_log:
The number of open connections increases and hits the mysql max connections border.
I am aware of the bug #885 and similar but I did not find any solution. This is fatal, we could not use piwik because it kills our site. This is why I set the priority that high, please correct.
Is this a piwik or a server problem?
The text was updated successfully, but these errors were encountered: