1. Limit RAM usage to 256 megabytes and CPU usage to 1 core:
Shell: Select all
export JAVA_OPTS="-Xmx256m -XX:ActiveProcessorCount=1"
filebot -script fn:sysinfo
If you do not configure the resource limitations correctly, then the process may inherit the physical limitations of the machine (e.g. 128 cores, 512 GB memory, etc) and get killed at random depending on actual per-run resource usage.
2. Use flock to ensure that only 1 filebot process is running at any point in time:
Shell: Select all
flock ~/filebot.lock filebot -script fn:sysinfo