I had reported in the last CorTeX run (way back when in 2014) that there are "out of control" gs processes, running for hours and hogging tons of RAM, essentially in an infinite loop.
I have seen this problem at work also, and would like to share the taste of the solution - although we may need to think how exactly to adapt it to LaTeXML.
The best fix I know of is applicable to manually invoking convert and looks like this (the numbers can be of course adjusted):
timeout --signal=9 600 nice -n 15 convert [options] ...
It ensures two aspects:
- convert (and its children) will never block the CPU by hogging all the cycles in some busy loop, due to the very high niceness
- convert (and its children) will never end up badly broken / looping forever - via the external monitoring of
timeout and the merciless 9 signal.
I am not immediately aware of the best way to transfer this to the LaTeXML calls to convert, but I definitely consider it a wise idea, as it would help the predictability of LaTeXML in all use cases.
I had reported in the last CorTeX run (way back when in 2014) that there are "out of control" gs processes, running for hours and hogging tons of RAM, essentially in an infinite loop.
I have seen this problem at work also, and would like to share the taste of the solution - although we may need to think how exactly to adapt it to LaTeXML.
The best fix I know of is applicable to manually invoking
convertand looks like this (the numbers can be of course adjusted):It ensures two aspects:
timeoutand the merciless9signal.I am not immediately aware of the best way to transfer this to the LaTeXML calls to convert, but I definitely consider it a wise idea, as it would help the predictability of LaTeXML in all use cases.