I am running my node.js server by forever and my script gets killed in 1-2 
days and i get this error in the log file:

    error: Forever detected script was killed by signal: SIGSEGV

Now i have many functions in my node.js script. Upon writing a console.log 
at  the beginning of each function i ended up getting this in the log:

    info: transport end (undefined)
    debug: set close timeout for client CbU1mvlYaIvDWHB4ChQa
    debug: cleared close timeout for client CbU1mvlYaIvDWHB4ChQa
    disconnection function
    debug: discarding transport
    debug: clearing poll timeout
    debug: client authorized
    info: handshake authorized 2O3m1B3dGWFOJ4W9ChQc
    error: Forever detected script was killed by signal: SIGSEGV

the log makes it seem as if either the connect or the disconnect function 
has a problem, but as the script seg faults after 2 days of running and 
over 10000 connections/disconnections i think that that might not be really 
the problem.

Here are my connection and disconnection functions. i also connect to my 
pgsql database via node-dbi:


    var DBWrapper = require('node-dbi').DBWrapper; 
    var DBExpr = require('node-dbi').DBExpr; 
    var dbConnectionConfig = { host: 'localhost', user: 'user', password:   
'pass', database: 'dbname' };
    dbWrapper = new DBWrapper( "pg", dbConnectionConfig );
    dbWrapper.connect();

    io.sockets.on('connection', function(socket) {
  
  
      console.log("socket connection");

    socket.on('set username', function(userName) {
    var milliseconds = (new Date).getTime();
    var data = { socketid: socket.id, time: milliseconds };
    dbWrapper.insert('all_sockets', data , function(err) {
    });

    });

    socket.on('disconnect', function() {
      
      console.log("disconnection function");
      dbWrapper.remove('all_sockets', [['socketid=?', socket.id]] , 
function(err) {} );
     });

    });


where could the segment fault be coming from?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/e16d1d32-95d5-4d62-8225-2942667d2180%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to