node.js - express server unresponsive after 5 POST's -


i using express serve single page webapp, , rest endpoint said app. works fine static page serving, after 5 posts server becomes unresponsive. have seen lot of other posts problem make sure call res.send() or res.end() in every call somewhere, regardless of how logic branches. app.js code below.

/**  * module dependencies.  */  var express = require('express'),   http = require('http'),   path = require('path');  var app = express(); var auth = require("./controllers/authentication.js");  http.globalagent.maxsockets = 100;  app.configure(function(){   app.set('port', process.env.port || 3000);   app.use(express.logger('dev'));   app.use(express.bodyparser());   app.use(app.router); });  app.configure('development', function(){   app.use(express.errorhandler()); });  app.get('/', function(req, res) {         res.sendfile('./public/index.html'); });  app.get('/public/*', function(req, res) {         res.sendfile('.'+req.url); });  app.post('/auth/login', function(req, res, next) {   auth.login(req, res, next); });  app.post('/auth/logout', function(req, res, next) {   auth.logout(req, res, next); });  app.post('/auth/verify', function(req, res, next) {   auth.verify(req, res, next, function(req, res, next) {     res.conenttype = 'json';     res.send(200, "authorized");   }); });  http.createserver(app).listen(app.get('port'), function(){   console.log("express server listening on port " + app.get('port')); }); 

and here command line output (i tried issuing other requests after, server not process them). assume somehow not terminating connection properly, cant figure out how.

enter image description here

problem related not closing mysql connection pool


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -