ponty / PyVirtualDisplay

Python wrapper for Xvfb, Xephyr and Xvnc
BSD 2-Clause "Simplified" License
714 stars 78 forks source link

RAM consumption Xvfd reaches almost 100% #21

Closed GildedHonour closed 7 years ago

GildedHonour commented 7 years ago

I have a script working on a server. Over time, as I can see in the dashboard of my server, the RAM consumption of Xvfd is increasing and reaching almost 100%. Here's my code:

from pyvirtualdisplay

display = Display(visible=0, size=(800, 600))
display.start()
# some staff

display.sendstop()

Am I releasing the Xvfd correctly?

ponty commented 7 years ago

I can not reproduce the problem.

Releasing is OK, stop() and sendstop() call subprocess.Popen.terminate. (https://docs.python.org/3/library/subprocess.html#subprocess.Popen.terminate)

This may help: http://blog.jeffterrace.com/2012/07/xvfb-memory-leak-workaround.html

GildedHonour commented 7 years ago

thanks.