Bug #89651 .Net Connector Threading Issues
Submitted: 13 Feb 2018 14:02 Modified: 20 Feb 2018 7:24
Reporter: jeff mac Email Updates:
Status: Verified Impact on me:
Category:Connector / NET Severity:S2 (Serious)
Version: OS:Any (mysql server on debian)
Assigned to: CPU Architecture:Any
Tags: framework error, threading, threads

[13 Feb 2018 14:02] jeff mac
The issue is and has been for about 4 years now, maybe longer.  When running a single executable with multiple threads, the .Net connector library starts to throw an error ".net framework error".  This error is useless, but after some troubleshooting I've narrowed it down to the .Net Connector Library.  The issue is when running more than 200 threads concurrently (depending on the performance on the machine) against the database the connector library loses the ability to close connections.  These connections start piling up on the database server and eventually the server returns "to many connections" <- this is not ".net framework error".  The ".net framework error" happens intermittently while the code is running.  I suspect that the ".net framework error" is the .net connector library losing control of the active connection.

How to repeat:

If you want the threading library I'm using it's here:
The test I've created is simple enough.  Create an app that will allow the adjustment of the number of threads actively running.  Then have a process that inserts a bunch of records, the data I used is the NFL football data
each thread is each object type, player, game, stats, etc. adjust the number of concurrent threads while watching the connection count on the database server.  continue to increase the number of concurrent threads until the connection count goes up but does not steady or go down.

Suggested fix:
My next step was to work with the source code of the connector library but I haven't had time to debug it.  So I don't know what the specific issue is in the connector library that needs fixed.
[20 Feb 2018 7:24] Chiranjeevi Battula
Hello jeff mac,

Thank you for the bug report.
Verified based on internal discussion with dev's.