memory leak with gearman_servers_set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman MySQL UDF |
Fix Released
|
High
|
Eric Day |
Bug Description
i'm having huge memory leak when i query :
SELECT gearman_
multiple times
here is my testcase :
memory for mysqld:
PID PPID RSS VSZ %CPU %MEM CMD
2825 2786 25464 172812 0.0 0.6 /usr/sbin/mysqld --basedir=...
i simulate 1000 clients doing a server set :
for i in `seq 1 1000`; do mysql -e 'SELECT gman_servers_
and then :
PID PPID RSS VSZ %CPU %MEM CMD
2825 2786 30840 189816 0.0 0.7 /usr/sbin/mysqld --basedir=
that's + 5MB
and after 10'000 iterations :
2825 2786 86464 365440 0.1 2.1 /usr/sbin/mysqld --basedir=
that's + 56MB
i need to restart mysqld 2 times a day because of oom...
when i query a simple select from a database, nothing changes.
i think this is because servers_set is actually a server "add", but how can i set globally the gearman server without always querying gearman_
can you please confirm this memory problem ?
Changed in gearman-mysql-udf: | |
status: | Confirmed → Fix Released |
You only need to run gman_servers_set() once at startup, doing so multiple times keeps adding entries to the list of possible servers. I agree though that this is poorly named and set() should replace, and add() should have this behavior. I'll fix this in the next release.