This repository has been archived by the owner on Feb 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Sandcastle error on loadtest #68
Labels
Comments
@raghu12133 it works well with smaller batch sizes? mind sharing a failing script? |
@bcoe below is the script which we tested: var SandCastle = require('sandcastle').SandCastle;
var script_content = fs.readFileSync('path to script to be executed in sandcastle').toString();
//route entry point
app.get("/execute", function(req, res){
execute_code(req.body.args, function(data){
res.json({"data": data});
});
});
var execute_code = function(params, callback){
var sandcastle = new SandCastle();
var script = sandcastle.createScript(script_content);
script.on('timeout', function(methodName) {
console.log("inside timeout");
return callback("timeout");
});
script.on('exit', function(err, output, methodName) {
console.log(output);
return callback(output);
});
script.run("fibonacci", {"args": params});
}
//script to be executed in sandcastle
exports = {
fibonacci: function() {
var looping = function(n) {
var a = 0, b = 1, f = 1;
for(var i = 2; i <= n; i++) {
f = a + b;
a = b;
b = f;
}
return f;
};
exit(looping(1000));
}
} we used apache benchmark to do the load test for 1000 request with 200 as the concurrency level and faced the above issue.. apache benchmark script:
|
also there seems to be a memory leak. check the logs:
|
would love some help digging into this, I'm not currently using SandCastle anywhere in production and would appreciate another set of eyes: CC: @joernroeder, @alexkwolfe |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We did a load test for 1000 request with 100 as the concurrency level, sandcastle exited with following error:
Error: spawn /usr/local/Cellar/node/5.5.0/bin/node ENFILE
at exports._errnoException (util.js:856:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:474:9)
at process._tickDomainCallback (node.js:429:17)
The text was updated successfully, but these errors were encountered: