Skip to content

Commit 6fbf0a3

Browse files
committed
bam
1 parent a017757 commit 6fbf0a3

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎v4-cokapi/cokapi.js‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ var NODE_BIN = '/usr/local/bin/node';
5757
var PYTHON2_BIN = '/usr/bin/python';
5858
var PYTHON3_BIN = '/usr/local/bin/python3.3';
5959

60-
var TIMEOUT_SECS = 3;
60+
var TIMEOUT_SECS = 5;
6161
var JAVA_TIMEOUT_SECS = 15; // the Java backend is SUPER SLOW :/
6262
var CPP_TIMEOUT_SECS = 15; // the C/C++ backend is also SUPER SLOW :/
6363

64+
var MAX_BUFFER_SIZE = 10 * 1024 * 1024;
65+
6466

6567
// bind() res and useJSONP before using
6668
function postExecHandler(res, useJSONP, err, stdout, stderr) {
@@ -150,7 +152,7 @@ function exec_js_handler(useJSONP /* use bind first */, isTypescript /* use bind
150152

151153
child_process.execFile(exeFile, args,
152154
{timeout: TIMEOUT_SECS * 1000 /* milliseconds */,
153-
maxBuffer: 5000 * 1024 /* 5MB data max */,
155+
maxBuffer: MAX_BUFFER_SIZE,
154156
// make SURE docker gets the kill signal;
155157
// this signal seems to allow docker to clean
156158
// up after itself to --rm the container, but
@@ -200,7 +202,7 @@ function exec_java_handler(useJSONP /* use bind first */, req, res) {
200202

201203
child_process.execFile(exeFile, args,
202204
{timeout: JAVA_TIMEOUT_SECS * 1000 /* milliseconds */,
203-
maxBuffer: 5000 * 1024 /* 10MB data max */,
205+
maxBuffer: MAX_BUFFER_SIZE,
204206
// make SURE docker gets the kill signal;
205207
// this signal seems to allow docker to clean
206208
// up after itself to --rm the container, but
@@ -233,7 +235,7 @@ function exec_ruby_handler(useJSONP /* use bind first */, req, res) {
233235

234236
child_process.execFile(exeFile, args,
235237
{timeout: TIMEOUT_SECS * 1000 /* milliseconds */,
236-
maxBuffer: 5000 * 1024 /* 5MB data max */,
238+
maxBuffer: MAX_BUFFER_SIZE,
237239
// make SURE docker gets the kill signal;
238240
// this signal seems to allow docker to clean
239241
// up after itself to --rm the container, but
@@ -267,7 +269,7 @@ function exec_cpp_handler(useCPP /* use bind first */, useJSONP /* use bind firs
267269

268270
child_process.execFile(exeFile, args,
269271
{timeout: CPP_TIMEOUT_SECS * 1000 /* milliseconds */,
270-
maxBuffer: 5000 * 1024 /* 5MB data max */,
272+
maxBuffer: MAX_BUFFER_SIZE,
271273
// make SURE docker gets the kill signal;
272274
// this signal seems to allow docker to clean
273275
// up after itself to --rm the container, but
@@ -314,7 +316,7 @@ function executePython(pyVer, req, res) {
314316

315317
child_process.execFile(exeFile, args,
316318
{timeout: TIMEOUT_SECS * 1000 /* milliseconds */,
317-
maxBuffer: 5000 * 1024 /* 5MB data max */,
319+
maxBuffer: MAX_BUFFER_SIZE,
318320
// make SURE docker gets the kill signal;
319321
// this signal seems to allow docker to clean
320322
// up after itself to --rm the container, but

0 commit comments

Comments
 (0)