spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

Server hangs after 100+ requests #78

Closed Vanuan closed 11 years ago

Vanuan commented 11 years ago

After 100+ requests the server stops responding. In Chromes web inspector I see multiple connections in pending state and "13 B 0 B" in the size column. I can reproduce it in Chrome 26 and Firefox 18, but not in Opera 12.14. I'm not sure who's this problem is.

I'm constructing a page that requests multiple "json" files. Probably node-spdy can't handle such a load. Was it load tested?

Vanuan commented 11 years ago

If I switch to another browser, server's response is fine. Opening a page in a new tab doesn't help.

Vanuan commented 11 years ago

On the chrome://net-internals/ page I see multiple messages:

SPDY_SESSION_STALLED_MAX_STREAMS
indutny commented 11 years ago

Interesting, are you sure you're closing connections (on server)? If you could provide reduced test case to reproduce this problem, I'd be really pleased.

Vanuan commented 11 years ago

What do you mean by "closing connections"? If you mean response.end(), then yes. Do I have to close something? I thought SPDY is all about keeping the connection open.

I'll try to provide a reduced test case some time later.

indutny commented 11 years ago

response.end() should be enough. Thank you!

indutny commented 11 years ago

Just for reference, what node.js and spdy versions are you using?

Vanuan commented 11 years ago

0.8.11 and 0.4.4 respectively

indutny commented 11 years ago

Are you sure about 0.4.4 ? The latest version is 1.4.4.

Also, I suggest trying updating node.js to 0.8.19.

Vanuan commented 11 years ago

Sorry, a typo. 1.4.4. Thanks, I'll try.

benurb commented 11 years ago

I can confirm that, but I'm afraid I can't help you to find the cause for this problem. I'm facing exactly the same issues as the reporter. The only thing I noticed is that in the SPDY session in chrome://net-internals/ the requests that hang are marked as "fin = true", while it seems all other requests have "fin = false". I don't know what this means, but I'm trying to narrow the problem down. It just appears sporadically, so that might take a while.

SunilAgrawal commented 11 years ago

Hi, is there any update on this bug? Is it fixed with latest version of Node.js and latest version of the library?

I want to start using SPDY in my project, and am looking for a suitable Node.js module to use.

indutny commented 11 years ago

@SunilAgrawal Several big companies are using this module and have no problems mentioned above, I suppose this issue should be closed.