RAM usage increases constantly
Brought to you by:
ansgarbecker
Originally created by: gnuoyno... (code.google.com)@gmail.com
I am using version 7.0.0.4219 and have noticed recently that it seems to consume a very large amount of RAM without releasing it. After closing tabs so no query tabs open it still uses huge RAM (had it up to over 1Gb a couple of days ago when using the current versions of the software).
I created this issue by performing a number of different queries over 2 new query tabs over a period of a few hours. After a bit the RAM usage just seems to be more and more until I need to close HeidiSQL and rerun it so it releases all the RAM and the machine becomes usable again.
HeidiSQL revision: 7.0.0.4219
MySQL Server version: 5.1.52
Operating system: Windows XP Pro SP3
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
Will make the same test, running it for a few hours and report back.
Did you have some larger query result open in any tab?
Summary: RAM usage increases constantly
Labels: Severity-Problematic
Status: Accepted
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
(No comment was entered for this change.)
Labels: Performance
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: gnuoyno... (code.google.com)@gmail.com
I have attached an example query that if run a number of times, you will see the RAM usage increase in the Task Manager. If you close the query tab the memory usage still remains and only gets released upon closing the program.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bas...@hotmail.com
My experience in regard to this issue (I'm not sure what the actual case is):
* HeidiSQL instance open for around 1 week, version 7.0.0.4304
* Have run quite a lot queries, most of them with very short result sets. Some do have multiple result set and some procedure have a large number of result sets (100 calls with 7 result sets each for example).
* Had 8 query tabs open
* Use the database quick filter quite often
* Ram usage increased to around 1.9 GB. HeidiSQL starts with AV's: 'out of memory'
* I only notice this problem since about 2 months or so. Before that, HeidiSQL could remain open with this usage pattern at least 1 month without noticeable RAM increase
I hope this helps to track down the memory leak. Can it be related to result sets remaining in memory?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bas...@hotmail.com
* I always use one HeidiSQL instance per database, so this was with a connection to 1 database only
* Connected to Mysql 5.1.66
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
No, result sets only remain in memory as long as you can see them, they're destroyed when you start another query. But it looks as if there is some correlation between result sets and long term RAM usage.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bas...@hotmail.com
I think the issue is 1:1 related to result sets. I've done the following test:
1. Connect to a database (HeidiSQL v7.0.0.4304)
2. SELECT * FROM {table}. I've used a table with about 5000 records and quite some columns. Query takes about 1 second. The query tab doesn't matter, can be the default one or a new one (control-t)
3. Execute the query multiple times after each other by manually pressing F9.
4. Notice an increase in RAM usage upon each query result (see image).
I've also checked what happens if SELECT * FROM {table} is selected many times in one command:
SELECT * FROM {table};
SELECT * FROM {table};
SELECT * FROM {table};
SELECT * FROM {table};
..
SELECT * FROM {table};
That results in high ram usage, because all resultsets will be open in the output window (that makes sense). If all these queries are run again, the memory is properly cleared, but I think not for the first resultset. But that's a guess, I could not verify that claim.
Can it be that the RAM for the first resultset is not properly cleared?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bas...@hotmail.com
Can you please look into this issue? My HeidiSQL instances run out of memory about once every week.
At the moment HeidiSQL crashes, there is a small amount of data in the client (small result sets in the query windows). So it seems that quite a lot of old resultsets are still allocated.
Please note the test I've performed in the previous post. I've just repeated it with the most recent build and the issue still occurs.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
May I ask how much RAM you have available? Your graph above shows a limitation somewhere at ~100M. Is that true? Will be hard to keep everything below that amount.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bas...@hotmail.com
I have 4 GB of RAM in my machine (Windows XP 32 bit, so baout 3.4 GB available). The clients are closed down by Windows if they consume about 1.85 GB of RAM.
The test above was with a small dataset to illustrate the problem.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bas...@hotmail.com
I noticed something regarding the memory usage today. If I close query tabs (Query 2 ~ Query 5) the memory consumption does not decrease. I'm not sure if closing a tab should release the memory from the resultset, but it was worth a try. The client instance was using 1.5 GB of RAM. After closing 4 out of five query windows (the first one cannot be closed) the consumption was still 1.5 GB.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: gnuoyno... (code.google.com)@gmail.com
After originally posting about this issue, it is still present within V8.0.0.4396. As bas...@hotmail.com says, even when closing tabs it still keeps hold of the memory and only releases it once HeidiSQL is closed.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: ian.bu... (code.google.com)@gmail.com
Hi,
After closing the tabs, can you try doing a 'select null' in the remaining query tab. see if that decreases/releases some of the memory.
I have a table 31k records wherein a select * increases mem by around 8M. I executed the statement 5 times in 1 query window adding around 40M+.
When I closed the tab, indeed the memory is not released...yet.
As per ansgar, "they're destroyed when you start another query", therefor I executed a 'select null' on the remaining query window.
it releases most of the memory taken up by the 40M query but still leaves around 1-2MB and that doesn't seem to be released until Heidi is restarted.
HeidiSQL 8.1.0.4548 (portable)
Windows 7 ent 64bit
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: gnuoyno... (code.google.com)@gmail.com
I have attempted what you suggest however no memory is freed on closing all the tabs and running 'select null' on the left over query tab just increases the memory usage up by another 4 to 5MB.