From a109b5769703d6ab2edbd7e79ab146b8b53ea516 Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Thu, 16 May 2019 22:09:06 -0400 Subject: [PATCH] Disable memory swap --- config.example.json | 4 ++-- src/struct/LanguageHandler.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.example.json b/config.example.json index dc6ecac..45b3d70 100644 --- a/config.example.json +++ b/config.example.json @@ -8,8 +8,8 @@ "python", "javascript" ], - "memory": "128m", - "cpus": "0.5", + "memory": "256m", + "cpus": "0.25", "timeout": 10000, "prepare": false } diff --git a/src/struct/LanguageHandler.js b/src/struct/LanguageHandler.js index dbfbf0a..3845fa3 100644 --- a/src/struct/LanguageHandler.js +++ b/src/struct/LanguageHandler.js @@ -71,7 +71,8 @@ class LanguageHandler extends AkairoHandler { const name = `comp_iler-${id}-${Date.now()}`; const proc = childProcess.spawn('docker', [ 'run', '--rm', `--name=${name}`, '-u1000', '-w/tmp/', '-t', '-d', - '--net=none', `--cpus=${this.client.config.cpus}`, `-m=${this.client.config.memory}`, + '--net=none', `--cpus=${this.client.config.cpus}`, + `-m=${this.client.config.memory}`, `--memory-swap=${this.client.config.memory}`, `1computer1/comp_iler:${id}` ]);