Created
April 17, 2014 21:28
-
-
Save davetapley/11012625 to your computer and use it in GitHub Desktop.
Failing to call res.send(200) in an express app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ab -n 1000 -c 1000 http://localhost:3000/hang | |
This is ApacheBench, Version 2.3 <$Revision: 1554214 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
apr_socket_recv: Connection reset by peer (104) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get '/hang', (req, res) -> | |
console.log 'Request ', n | |
n += 1 | |
# res.send 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Additionally, I found you can pass
-r
toab
to have it ignore socket errors.When I use that I actually start to see some requests being completed:
What could be happening here?
Does express or node know to time out and close the connections?