Bug #40260 Agent increases memory usage as different queries go through the agent
Submitted: 22 Oct 2008 16:15 Modified: 11 Nov 2008 14:24
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S2 (Serious)
Version:2.0.0.7082 OS:Any
Assigned to: MC Brown CPU Architecture:Any

[22 Oct 2008 16:15] Diego Medina
Description:
As you send different queries through the agent, the agent uses more and more memory.

How to repeat:
1- Install and start the agent and monitor
2- Configure the Query Analysis to enable Query Sample, Example and Explain
3- Monitor the memory usage of the agent
4- Send some queries through the agent (an app like sugarCRM would do)
5- Notice that the agent's memory usage goes up
6- Do not send any more queries and notice that the memory usage will not go down.
[23 Oct 2008 21:12] Kay Roepke
Number (2) could be tricky without a parser, but we can do a "best-effort" fix.
It's especially problematic when elements of those lists aren't simply literals, but function calls, thus requiring tracking nested parens etc.
[28 Oct 2008 23:58] Jan Kneschke
1058 jan@kneschke.de	2008-10-29
     cut the example-query we send up to the server at 10k-chars (fixes #40260)

       * this may break the query and may break UTF-8 
modified:
 lib/quan.lua

1057 jan@kneschke.de	2008-10-29
     compress multi-row INSERTs into INSERT ... ( ... ) /* , ... */ (fixes #40260)
modified:
 lib/quan.lua
 tests/unit/lua/quan.lua

1056 jan@kneschke.de	2008-10-29
     added tests for the multi-row inserts
modified:
 tests/unit/lua/quan.lua

1055 jan@kneschke.de	2008-10-28
     added basic unit-test around the normalizing functions
added:
 tests/unit/lua/quan.lua
modified:
 lib/proxy/test.lua
 tests/unit/lua/CMakeLists.txt
 tests/unit/lua/Makefile.am

1054 jan@kneschke.de	2008-10-28
     added the unit-tests for lua into the ctest based framework
added:
 tests/unit/lua/CMakeLists.txt
modified:
 tests/unit/CMakeLists.txt
[30 Oct 2008 18:38] Diego Medina
The First option has been implemented on 2.0.0.7087, once I enter a new bug for the 3rd option, I'll close this one
[31 Oct 2008 19:26] Diego Medina
Verified fixed on 2.0.0.7087
[11 Nov 2008 14:24] Tony Bedford
An entry was added to the 2.0 changelog:

As different queries were sent through the agent it used increasing amounts of memory.