Description
- Version: 12.9.1
- Platform: Linux
Hey,
I've tried to create a simple client-server app using http/2, which needs to transfer directories.
So I started with simple directories, that contains about 10-20 files, then moved to directories containing lots of files 100K, 200K, etc. all of the file we're pretty small (~ 1KB). That worked well…
Then, I've tried to test the performance on larger files, about 300 files, 1GB each. But I got errors, and I have no idea why.
Code is here:
https://github.com/Rantoledo/http2_nodejs_client_server_example2.git
When I set concurrency to 300, all files are downloaded, but I get a SIGABRT error at the end:
node[4183]: ../src/node_http2.cc:892:ssize_t node::http2::Http2Session::ConsumeHTTP2Data(): Assertion `(flags_ & SESSION_STATE_READING_STOPPED) != (0)' failed.
1: 0x9bcac0 node::Abort() [node]
2: 0x9bcb47 [node]
3: 0x9f274a node::http2::Http2Session::ConsumeHTTP2Data() [node]
4: 0x9f3060 node::http2::Http2Session::OnStreamRead(long, uv_buf_t const&) [node]
5: 0xad8eab node::TLSWrap::ClearOut() [node]
6: 0xadb308 node::TLSWrap::OnStreamRead(long, uv_buf_t const&) [node]
7: 0xa71ab6 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [node]
8: 0x12bb2d9 [node]
9: 0x12bb900 [node]
10: 0x12c1438 [node]
11: 0x12afd7b uv_run [node]
12: 0xa002c7 node::NodeMainInstance::Run() [node]
13: 0x993cd8 node::Start(int, char**) [node]
14: 0x7ff4fc7c502a __libc_start_main [/lib64/libc.so.6]
15: 0x932bf5 [node]
Aborted
When I set the concurrency to something less than 300, say 200, after coping 200 files, I get an 'error code NGHTTP2_ENHANCE_YOUR_CALM' error, 'error code NGHTTP2_INTERNAL_ERROR' and also SIGABRT error.
- sometimes I get only SIGABRT error without the INTERNAL and ENHANCE, I really don't know why. There's an inconsistency…
More info:
1. When I deployed the server with 'createServer' that worked…
2. I don't think this is an error of closed/opened file, or streams, or session, because I added listeners, and tried to debug it, and didn't notice any stream hanging there for no reason (maybe I'm wrong).
3. I've tried to set the max session memory variable to 10000, but still had the same results. BTW the documentation doesn't really explain how this variable works. I don't think that's the problem.
I think something is wrong with resources management (because of the SIGABRT) - if so I think that's an important bug to fix because http2 is great and has a big advantage using multiple streams on one session.