Bug #26958 Abnormal "Too many connections" error
Submitted: 8 Mar 2007 13:45 Modified: 10 Apr 2007 16:28
Reporter: Guillaume Lefranc Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.1.16-log OS:Linux (Ubuntu 6.06 LTS)
Assigned to: CPU Architecture:Any

[8 Mar 2007 13:45] Guillaume Lefranc
Description:
When making large queries against a single MyISAM table, MySQL sometimes become inaccessible with a "Too Many connections" error. It's not easily repeatable IMHO, but the problem occurred 4-5 times this month and I will rollback to 5.0 to avoid this.

How to repeat:
The context is quite simple. I have this 5.1 database which stores large log tables (20 to 40GB). I'm just doing single mysql commandline client connections against this database, no other activity. The max_connections variable is set to 1000 so it should be sufficient IMHO. The type of queries I usually do is mass inserts (LOAD DATA INFILE) or large selects which usually take more than 1 hour. So, this should use one single thread.

When the problem occurs I have this "error 1040 : too many connections". I can also witness this in the output of ps amx : all the threads are being used at this time. Also the output of netstat -l shows that 985 mysql unix sockets have been created, which is unusual.
[8 Mar 2007 19:18] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.16, and, in case of the same results, when you'll start getting this error connect as root (it should be possible) and get the results of SHOW PROCESSLIST. Send/upload them to this report.
[8 Apr 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[10 Apr 2007 16:16] Valeriy Kravchuk
Feedback is still needed.
[10 Apr 2007 16:28] Guillaume Lefranc
Not reproduced on 5.1.16 over 1 month, so we should close this bug.
[30 Mar 2008 4:34] Ranju VS
Hi All,

I have a large database to manage inventory. The inventory list comes around 5.1 million. While fetching data from this table its taking quite long time. We got an error while trying to fetch out all the records.

Error 28  Low disk space. But later it was not seen.

As part of optimization, last week I tried to optimize the inventory table. In the middle of the process the MySql server went down. The MySql server was restarted but when I took PhpMyadmin I was getting the #1040 - Too many connections error.

I want to know why this error is popping up. Is this because of low disk space(Space alloted to tmp partition) or of too many connections which I believe is not the case as we have restarted the server.

The space alloted for tmp partition is almost used up. Kindly let me know why this happening.

Regards
Ranju