odd behavior in express for listening on request

My app just simply takes in input and stores it in an array and then removes it but here's what I get when I type in 1234567890 in sequential order

 Express server listening on port 3000
 1 1
 0
 12 1
 0
 123 1
 0
 1234 1
 0
 12345 1
 0
 123456 1
 0

then it halts for around 3 minutes before displaying this

 1234567 1
 0
 12345678 1
 0 
 123456789 1
 0
 1234567890 1
 0

why does it halt? seems like there's some sort of timeout going on or there's some sort of listener I'm not handling properly

 var express      = require('express')
 , http         = require('http')
 , path         = require('path')
 , fs           = require('fs');

 var app = express();

 app.configure(function(){
      app.set('port', process.env.PORT || 3000);
      app.set('views', __dirname + '/views');
      app.set('view engine', 'jade');
      app.use(express.favicon());
      app.use(express.logger('dev'));
      app.use(express.bodyParser());
      app.use(express.methodOverride());
      app.use(app.router);
      app.use(express.static(path.join(__dirname, 'public')));
 });

 var queries = new Array();

 function printAndShiftArray() {
      console.log(queries + " " + queries.length);
  if (queries.length == 0) {
       console.log("array is empty");
  } else {
       queries.shift();
  }
       console.log(queries + " " + queries.length);
 }

 app.get('/', function (req, res) {
     res.sendfile(__dirname + '/index.html');
 });

 app.post('/search', function(req, res) {
 input = req.param('letter');
 queries.push(input);
 printAndShiftArray();
 }); 

 http.createServer(app).listen(app.get('port'), function(){
     console.log("Express server listening on port " + app.get('port'));
 });

calling the /search api with this

        $(document).ready(function() {
            $('#letter').on("keyup", function() {
                letter = $('#letter').val();
                $.post("/search", { letter: letter}, function(data) {
                    $('#status').html(data);
                });
            });
        });

You need to res.end('') in your /search handler.

You are not ending the response when handling /search. Thus there are 6 concurrent requests open from your browser at the point where you hit '6', and jQuery will send no more. It then waits for 3 minutes, until those requests time out (with an error, which you don't see), and then it will send the remaining 4.