Tuesday 15 July 2014

Node.js server is breaking without any error -



Node.js server is breaking without any error -

i using border module (https://github.com/tjanczuk/edge) read sql database. function follows:

function getbetweenrows(cb) { //console.log("lastcheckedid within function ", lastcheckedid); //console.log("lastinsertid within function ", lastinsertid); console.log("here 2"); var query = { connectionstring: "data source=localhost;initial catalog=db-name;integrated security=true", //source: "select * customermaster customerid between '" + lastcheckedid + "' , '" + lastinsertid + "';" source: "select * customermaster customerid between '2965' , '2972';" }; console.log("query ", query.source); console.log("here 3"); var getrows = edge.func('sql', query); console.log("here 4"); getrows(null, function(error, result) { console.log("here 5"); if (error) { console.log(error); throw error; log.error({rows:error}); } rows = result; log.info({rows:rows}); console.log(rows); console.log("here 6"); cb(rows); }); }

funny thing code working on other systems. on particular system, prints till here 4 , server breaks. doesn't show error whatsoever. how find out what's problem?

sorry, don't know posted happening diferently on diferent systems if want debug , find step step diferences on 2 systems, utilize node debugger:

http://nodejs.org/api/debugger.html

it's worth getting know.

also, have noticed occasional issues cannot yet explain, when throwing errors. seek commenting out throw line on offending scheme (an maybe log.js phone call well.) if fixes issue, know errors.

let me know find.

node.js

No comments:

Post a Comment