Page 1 of 1

Optimizations for Shared Hosting Environments

Posted: 22 Jan 2021, 08:49
by rednoah
If you are a tenant on a shared hosting multi-user environment, then you may need to manually configure JAVA_OPTS with the correct per-process or per-user resource limitations.



1. Limit RAM usage to 256 megabytes and CPU usage to 1 core:

Code: Select all

export JAVA_OPTS="-Xmx256m -XX:ActiveProcessorCount=1"
filebot ...
:!: You may need to adjust these limits depending on your host and use case. Please ask your hosting provider for details on enforced resource limits.

:!: 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:

Code: Select all

flock ~/filebot.lock filebot ...