mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
Fix issue where large files can be written to exhaust space
**BREAKING CHANGE** Requires manually editing the config file, or deleting the config file entirely!
This commit is contained in:
parent
73391cf718
commit
a6bc24e22e
2 changed files with 9 additions and 2 deletions
|
@ -74,7 +74,8 @@ class Job {
|
|||
const prlimit = [
|
||||
'prlimit',
|
||||
'--nproc=' + config.max_process_count,
|
||||
'--nofile=' + config.max_open_files
|
||||
'--nofile=' + config.max_open_files,
|
||||
'--fsize=' + config.max_file_size
|
||||
];
|
||||
|
||||
const proc_call = [
|
||||
|
@ -185,7 +186,7 @@ class Job {
|
|||
async cleanup() {
|
||||
logger.info(`Cleaning up job uuid=${this.uuid}`);
|
||||
await fs.rm(this.dir, { recursive: true, force: true });
|
||||
let processes = [1]
|
||||
let processes = [1];
|
||||
while(processes.length > 0){
|
||||
|
||||
processes = await ps_list();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue