MaxListenersExceedsWarning when used with http2
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- backend
Research direction
Start by reproducing the warning with serve-static under Node 7.10.0 and an http2 server, then inspect how the middleware and on-finished add and remove listeners. Confirm whether listeners are eventually removed and determine whether serve-static can prevent the warning; the issue is done when the behavior and an appropriate fix or limitation are established.
Written by the indexing model from the issue text.
Description
I am aware of #7 which was closed a while ago now. However the issue still is occurring for me, using node 7.10.0. I think that is probably because I am using the http2 as the server and because the app that it is serving is a polymer custom components one, so calling index.html does cause an immediate request for quite a large number of additional files (approx 40 if I remember correctly) which should be being served through serve-static.
I have put a trace on the warning and confirmed it comes from the on-finished module as expressed in #7. I have also puts some instrumentation in the module that is adding and removing the listeners, so I am pretty sure that although a lot are added they are all eventually removed again, to I don't think there is an actual memory leak happening.
I report it here to see if there is anything that serve static could do to prevent the warning occuring
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 240
- Avg merge
- 14d 9h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expressjs/serve-static
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
expressjs/serve-static#149 · 2 comments ·
-
too wide CSP header in redirect responsePossibly taken @Sumit-Mayani claimed this 187 days ago. Openbug investigate
Difficulty 4/5 3-5 days Newbie friendliness 25/100
expressjs/serve-static#187 · 9 comments ·
-
awaiting more info
Difficulty 4/5 3-5 days Newbie friendliness 25/100
expressjs/serve-static#155 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
expressjs/serve-static#138 · 1 comment · 3 reactions ·
-
awaiting more info
Difficulty 5/5 Over a week Newbie friendliness 30/100
expressjs/serve-static#136 · 8 comments ·
All issues in expressjs/serve-static
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/agent-skills#348 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
NanmiCoder/dsh-agent-teams#289 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
c1overzz/dsh-bili-scroll#124 ·
Maintainers usually reply within 1 day