2

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 ;) )

Mat
  • 51,578
  • 10
  • 158
  • 140
Dag
  • 195
  • 2
  • 7

2 Answers2

1

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

jterrace
  • 111
  • 3
0

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.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
  • 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