Does the Gearman server leak memory? Why does my process grow in size?

Asked by Lu Liu on 2011-01-11

I am running 0.13 version of c server. Here is the sequence that causes high memory usage.

1. Start gearman server: ./gearmand -d --log-file=logs/gearmand4735.log --verbose -p 4736
It had low memory footprint.
2. Gearman client started to send lots of tasks to gearman server. For whatever the reason, there were no workers working at the time. Tasks were stuck in the gearman server.
3. After a while (say 1 hour later), gearman workers came back to work and cleared all the tasks in server queue. However, gearman server's memory usage stays at the level as it was before any gearman workers came to work.

It is a normal behavior?

Thanks,
Lu

Question information

Language:
English Edit question
Status:
Answered
For:
Gearman Edit question
Assignee:
No assignee Edit question
Last query:
2011-01-11
Last reply:
2015-01-17
timuckun (timuckun) said : #1

Yes this behavior is normal.

Gearman stores all the jobs in RAM even if you have persistance enabled. When the jobs are cleared that memory does not get released back to the operating system unless you restart gearman.

Wayne Warren (waynr+launchpad) said : #2

This makes me not want to use gearman. Why wouldn't you free memory after the job is cleared?

Does this answer reflect the behavior of the current version of gearman?

Can you help with this problem?

Provide an answer of your own, or ask Lu Liu for more information if necessary.

To post a message you must log in.