spdy-http2 / node-spdy

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

Event loop block #328

Closed llaakso closed 6 years ago

llaakso commented 6 years ago

I'm trying to figure out why my simple express server (4.15.5) serving static files event loop gets blocked under very low load - sometimes for seconds After some debugging, I found out that it always happens just before new spdy request/connection arrives:

Wed, 27 Sep 2017 20:54:00 GMT spdy:scheduler tick async index=0 start=0.11111111111111116
Wed, 27 Sep 2017 20:54:00 GMT spdy:scheduler tick async pending=1 [ <Buffer 00 00 00 00 01 00 00 00 11> ]
Wed, 27 Sep 2017 20:54:00 GMT spdy:scheduler after tick pending=0
Execution blocked for 233 ms [2017-09-27 23:54:04.613]
Execution blocked for 320 ms [2017-09-27 23:54:05.495]
Execution blocked for 401 ms [2017-09-27 23:54:06.037]
Wed, 27 Sep 2017 20:54:06 GMT spdy:connection:server id=0 frame { type: 'HEADERS',
  id: 19,
  priority: { parent: 0, exclusive: false, weight: 16 },
...

It sounds like new request is coming and spdy is trying to poll / parse it too extensively... this may also be related to #304

llaakso commented 6 years ago

Seems to affect non-spdy express as well.