Adding res.end() to see if it alleviates the socket timeout errors.