Bug #32523 Unable to create threads more then 180 (MySQL 5.1 On Windows 2003+IIS 6)
Submitted: 20 Nov 2007 14:01 Modified: 21 Dec 2007 10:30
Reporter: Jagdish Mehta Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.11 OS:Windows (Windows2003)
Assigned to: CPU Architecture:Any
Tags: A possible OS-dependent bug, Can't create a new thread, Error No 12

[20 Nov 2007 14:01] Jagdish Mehta
Description:
I am having MySQL 5.1.11 installed on Win2k3 Box
It has enough physical ram (4 GB) but as per our observation we have found that when the user connections reaches to approx 180, then MySQL service stop responding and need to restart the MySQL service or need to kill the MySQLd-nt.exe and then start the MySQL servies.

While browsing we get the below mentioned error.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL] [ODBC 3.51 Driver] Can't create a new thread (error no 12); if you are not our of available memory, you can consult the manual for a possible OS-dependent bug

We have tried the time wait parameters in my.ini but it did not helped. Also there is no hardware bottlenecks which can cause this. As per the relevant thread "http://bugs.mysql.com/bug.php?id=20815", there was a patch committed to sort this issue, if you can provide me that link will be reallt appriciated. 

Further, We are having 2 servers running with same above config, they are configured in replication, but most of the queries are configured to sent to master and that is where the problem is observed.

Your help will be really useful to understand our problem and its workaround. 

How to repeat:
This is repeated as and when the connections reaches close to 180.

Suggested fix:
http://bugs.mysql.com/bug.php?id=20815 (but couldnt find any download file)
[20 Nov 2007 14:04] Jagdish Mehta
Changing the severity looking at the urgency of the problem faced by us.

Since it is now 2 days and have not found any work around on it.
[20 Nov 2007 14:34] Valeriy Kravchuk
Thank you for a problem report. Please, send your my.ini file content. Is it 32-bit or 64-bit Windows 2003?
[20 Nov 2007 15:15] Jagdish Mehta
Dear Valeriy,

Thanks for ack my problem.

The OS for both the servers are Win2k3 Std. Edition 32 bit.

have attached the my.ini files before this message.

Thanks!
[20 Nov 2007 16:03] Sveta Smirnova
Thank you for the feedback.

Your configuration file looks OK.

But version 5.1.11 is quite old. Please upgrade o current version 5.1.22, try with it and if you can repeat the error run `netstat -n` in cmd.exe and send us its output: we need to examine how many threads in TIMED_WAIT state in case if you hit  http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html#can-not-connect-to-s...
[21 Nov 2007 7:29] Jagdish Mehta
Dear Sveta,

Thanks!

Can you please confirm if the config looks OK then is this version (5.1.11) has this limitations (not more then 180 connection)which is causing the service crash?

Requesting some reference study links on the same.
[21 Nov 2007 7:33] Jagdish Mehta
also, let me know if this upgrade solves my problem.

If you can send me links for download/upgradation process from 5.1.11 to 5.1.22.

Regards,
Jagdish Mehta
[21 Nov 2007 7:41] Jagdish Mehta
Dear Sveta,

If you can provide me with some quick fix for this solutions as in terms of any patch/ or any immidiate config changs which can be applied on the current version to sort this issue would be really great!!
[21 Nov 2007 10:30] Sveta Smirnova
Dear Jagdish,

this database is for MySQL bugs and not for help of using MySQL products. Additionally we don't backport bug fixes into previous minor versions of our products. So all filled bugs we have to check with last available version. Also 5.1 branch has not released yet and having problems with earlier alpha or beta versions of this product is expectd. This is why I asked you to upgrade.

But your problem most probably not a bug. Please read again my previous comment and follow instructions provided by our manual.

And if you can repeat error 12 after completing these instructions and with version 5.1.22 please reopen the report.
[22 Dec 2007 0: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".