PHP CLI in the background behaving badly. That applies "in a hurry", well-behaved BASH, Perl and Python.
In the task where it was necessary to preserve resources, did
1. The PHP script stores the "job" to BASH in some directory job
2. Kron-the-minute launches a dispatcher script, written in Perl (was a viable option and BASH) who is looking for a N the oldest (by time last modified) scripts from the directory job, and launches them.
3. Run the scripts the first thing destroy (rm) himself, that They still are — because they are already loaded in RAM. The results are stored in filesystem or in a database, to service interface logic
The number N for each server detected individually by testing.
Was "rock bottom" which at first never even was discovered quite time — everything runs Kron should work with absolute paths.
So had to do a project like YouTube and similar, also converting videos.