The MySQL Query Browser is a GUI tool for running queries on MySQL database servers. This post looks at an issue where the query browser reports an issue with memory load being extremely high and prevents the query from running. There are versions of the MySQL Query Browser for Windows, OS/X and Linux (or you can compile from source); I got this error on the Windows version and it may or may not affect the other platforms.
The memory load of the system is extremely high
A screenshot of the error message is shown below:
The full text from the error is "Problem while executing query. The memory load of the system is extremely high. In order to keep the system responsive record set retrieval has been stopped".
Is it a client or server issue?
The error message gives no indication whether it is an issue with the client (i.e. the machine you are running MySQL Query Browser on) or the server that the MySQL server is running on. After some research I discovered that it is an issue with low memory availabilty on the client. It seemingly appears to occur at random – one second it might report the error and next second it runs the query just fine.
Why does this error occur?
I found this bug submission dated July 28th 2007 which covers the issue in some detail from comments from a number of people. It turns out that the developers of this tool decided in their infinite wisdom to run a check to see if there’s at least 5% of system memory available on the client before running the query. Rather than allowing the operating system to manage memory for them they run a check themselves, and use a percentage as the basis for making the decision.
There’s a comment on that bug report page by Starson Hochschild which shows the part of the source code which does the actual check, and which looks like this:
... if GetMemoryLoad > 95 then begin Thread.CancelQuery; S := _('The memory load of the system is extremly high.'); ...
How to solve the problem?
The only solution, other than modifying the source code and recompiling the application yourself, is to close some apps to free up some memory so that at least 5% is available. Memory usage ebbs and flows anyway, which is why sometimes the query will work and sometimes it won’t when you are almost maxxing out memory on your machine.
The following screenshot is from the Windows XP Task Manager:
The "Available" amount needs to be at least 5% of the "Total" amount for the queries to run. In the above screenshot it’s 8.58% which means the query will run.