Bug #73122 Memory leaks in Connector/Net
Submitted: 26 Jun 2014 11:28 Modified: 19 Feb 2015 21:19
Reporter: Aleksandr Bocharnikov Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.9.1 OS:Windows (7)
Assigned to: Francisco Alberto Tirado Zavala CPU Architecture:Any
Tags: Connector/Net, memory leadks

[26 Jun 2014 11:28] Aleksandr Bocharnikov
Description:
We recently moved our system from Ms Sql Server to MySql, then came a memory leak, because of which the service part of our system have to reboot several times a day.

We have a suspicion that the problem with memory leaks in the Connector/NET.

We spent a simple test (source code in C# in the attachment):
In a loop for example with 100,000 iterations, open a connection to the database, and execute a simple command.
As a result, the memory required for the test utility when accessing MS SQL practically not growing, and when accessing MySql increases in direct proportion to count iterations and complexity of the request (print screens in the attachment).

We believe that if in this small test utility is noticeable memory leak in our combat system this leads to eating up all memory.

Please help to solve the problem.

Attachment:
http://fs.dunus.ru/mysqlmemoryleaks/PrintScreens.rar - print screens
http://fs.dunus.ru/mysqlmemoryleaks/TestMySqlMemoryLeaks.rar - source code in c#

How to repeat:
In a loop for example with 100,000 iterations, open a connection to the database, and execute a simple command.

As a result, the memory required for the test utility when accessing MS SQL practically not growing, and when accessing MySql increases in direct proportion to count iterations and complexity of the request (source code in C# and print screens in the attachment).

Suggested fix:
Fix memory leak in Connector/NET
[26 Jun 2014 11:35] Aleksandr Bocharnikov
Print Screens

Attachment: Screens.rar (application/octet-stream, text), 365.50 KiB.

[26 Jun 2014 11:35] Aleksandr Bocharnikov
Source code of test utility in c#

Attachment: TestMySqlMemoryLeaks.rar (application/octet-stream, text), 88.56 KiB.

[30 Sep 2014 8:45] Dmitry Rokin
Dear developers,
please fix this bug as soon as possible. We have got claims from our customers and we will need to migrate from MySQL to other DBMS if you will not solve the problem :(

Best regards, Dmitry.
[30 Sep 2014 12:25] Francisco Alberto Tirado Zavala
Hello Dmitry.

This bug is already fixed, and the fix will be released soon.

Thanks for your time.
[7 Oct 2014 11:43] Dmitry Rokin
Francisco, thanks for the quick answer!
Can you tell me, when this release will be available (approximately)?

Best regards, Dmitry.
[7 Nov 2014 2:22] Philip Olson
Posted by developer:
 
Fixed as of the upcoming Connector/Net 6.7.7 / 6.8.5 / 6.9.5 releases, and here's the changelog entry:

A memory leak was fixed.

Thank you for the bug report.
[11 Nov 2014 7:27] Aleksandr Bocharnikov
Nice, Thank you! 

Please tell me, when will 6.9.5 Connector/Net? 

If not soon, then could you send us a patch?
[23 Jan 2015 17:09] Gabriela Martinez Sanchez
Posted by developer:
 
Reopened.. since this is not released yet and the version fixed was not correctly assigned.
[13 Feb 2015 10:55] Dmitry Rokin
Dear developers,
please clarify status of this bug: is it fixed in Connector/Net 6.9.5 or not? (I mean the previous post of Gabriela Martinez Sanchez)
We use Connector/Net 6.9.5 and memory leaks still present :(

Best regards, Dmitry.
[13 Feb 2015 18:52] Roberto Ezequiel Garcia Ballesteros
Hi Dmitry,

The fix was included in 6.9.5.

If you're having memory leaks issues in this version, could you please provide us information about your environment, pieces of code, etc., that could help us to replicate the scenario in order to detect the cause of this behaviour.

Thank you for your report.

Regards,
Roberto
[19 Feb 2015 1:36] Philip Olson
Posted by developer:
 
Changing status to "QA Review" as the status of this bug fix is in question.
[19 Feb 2015 21:19] Philip Olson
Posted by developer:
 
The developers and QA confirm that this is closed, so, status->closed.

Dmitry, please report if your findings/information is different.