Bug #3710 Backup uses excessive amounts of memory
Submitted: 11 May 2004 12:49 Modified: 30 Jun 2004 22:28
Reporter: Lars Geisler Email Updates:
Status: Closed Impact on me:
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.0.3 alpha OS:Windows (Win 2000 pro)
Assigned to: Bugs System CPU Architecture:Any

[11 May 2004 12:49] Lars Geisler
When doing a backup of a database of size ca. 200 MB on disk, MySQL administrator uses virtuel memory of about 1 GigaByte!
When making even bigger backups - the limit of virtual memory is reached, and The backup chrashes - with an out of memory message. 

As long as there is sufficient virtual memory - the backup finishes OK - but the memory is NOT released until MySQLAdministrator is closed.

How to repeat:
Make backup of a database of non-trivial size. Look at the task manager i windows.

Suggested fix:
Find the leak :-)
[11 May 2004 14:23] Lars Geisler
I have tried the same backup on Linux Suse 9.0 with latest 1.0.3alpha - and the same thing occurs, but to a slightly lesser degree.
[2 Jun 2004 0:21] John Foley
Likely (possibly?) a related problem . . . two instances of MySQL Administrator 1.0.3alpha on Windows XP Pro, one server was MySQL 4.0.16-nt on NT Server 4.0 and the other server 4.0.12-max-log on Solaris 8.
     Both instances were left on the "Connection Health" or "Memory Health" screens.
     After the long US holiday weekend (from Friday evening to Tuesday morning) the MySQL Administrator instance(s) consumed enough memory to inspire XP Pro ti increase my swap file size to nearly 4 gigabytes. The client is a P4 3.06 Xeon with Hyperthreading enabled, 1GB RAM, and (formerly) 3.0 GB swap file.
[5 Jun 2004 0:01] Ulrich Bayer

I have found and fixed two memory leaks in the backup-code. In the Windows-version that is going to be released today or tomorrow these changes will be included.
I have had no time though to carefully look at the whole code in question so I will leave this bug open until I'm sure that it's fixed.

I don't think that problems with the health-tab are directly related to this problem. Also in version 1.0.3alpha and above there should be no memory leak in the health-section. (There was one before though.)
[30 Jun 2004 22:28] Ulrich Bayer
I didn't find more leaks.