Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.