mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-24 05:56:26 +02:00
api: add rlimits to config
This commit is contained in:
parent
e31e66aad5
commit
920e6e7054
2 changed files with 17 additions and 1 deletions
|
@ -71,7 +71,11 @@ class Job {
|
|||
async safe_call(file, args, timeout){
|
||||
return await new Promise((resolve, reject) => {
|
||||
const unshare = config.enable_unshare ? ['unshare','-n','-r'] : [];
|
||||
const prlimit = ['prlimit','--nproc=64','--nofile=2048'];
|
||||
const prlimit = [
|
||||
'prlimit',
|
||||
'--nproc=' + config.max_process_count,
|
||||
'--nofile=' + config.max_open_files
|
||||
];
|
||||
|
||||
const proc_call = [
|
||||
...prlimit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue