Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We want to create screenshots of websites for our software, and we are doing this by using CutyCapt with Xvfb.

Unfortunatly every time CutyCapt takes a screenshot, the memory of Xvfb increases .. until the memory of the boy explodes. This is not bound to CutyCapt, it seems that the Xvfb doesn't clean some memory when the application quits.

Are there any solutions (except restarting Xvfb (which we do now via cron as a hotfix)).

I start Xvfb with Xvfb :1 -screen 0 1280x1024x24 (in a script of course ;) )

share|improve this question
up vote 0 down vote accepted

There are known memory leaks in Xvfb; see for example Red Hat bug #498357 (and #201536 before it).

Restarting Xvfb after a time interval, or when its memory size reaches a certain threshold ([ $(ps -o vzs= $pid) -ge $threshold ]), or after a certain number of screenshots, seem reasonable workarounds until this bug is located and fixed.

share|improve this answer
Well, no real solution since I already do restarts. But because it is a known bug you give me the connecting point to, and there is no other solution, I accept it. Thanks. – Dag Nov 30 '11 at 22:56

Adding -noreset to Xvfb arguments makes the memory leak go away. See my writeup on the issue here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.