-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sporadic ERR_STREAM_PREMATURE_CLOSE #116
Comments
What makes this issue worse is that it combines with
|
Are you able to reproduce this reliably? Would you mind adding sending a PR that fixes it? |
I wish I could reproduce it reliably. I'd love to PR it, but I'm completely
stumped to what's going on.
After about 3 days of fruitless debugging, I've got no leads and am
considering switching servers to koa or something.
…On Wed, Nov 27, 2019, 4:11 AM Matteo Collina ***@***.***> wrote:
Are you able to reproduce this reliably?
Would you mind adding sending a PR that fixes it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#116?email_source=notifications&email_token=AB5S2SRM7BWQ5O3C77UA3ITQVY2UZA5CNFSM4JRZSIMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFI2E3Y#issuecomment-558998127>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5S2STCRNFUA2UQTGE4WPDQVY2UZANCNFSM4JRZSIMA>
.
|
Same here, I have used those extensively and I have never experienced this. Is this limited to Firefox / Mac OS X?
Passive-aggressive comments like this are not tolerated. Fastify is an open community, and we develop this framework together. I'm sorry this is frustrating for you, but we have no obligation in supporting you. |
I’m sorry, I didn’t mean to slight the quality. I’m sure this is something I’m doing wrong, but I made the mistake of thinking out loud for how I’m going to hit my demo deadline. This does indeed seem to be restricted to MacOS. I’ll try reproducing on Ubuntu to see if I can eliminate that variable. |
I haven't run it on *nix yet, but I can confirm it doesn't seem to be related to the filesystem: the same errors happen with a final production build, or with Webpack's in-memory development mode. |
Are you using http2? |
No, it's HTTP/1.1. I'll see if I can repro on HTTP/2 though for more data.
…On Tue, Dec 10, 2019, 5:51 PM Manuel Spigolon ***@***.***> wrote:
Are you using http2?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#116?email_source=notifications&email_token=AB5S2SVBYD77QVQET4QXZ5LQYAMQ7A5CNFSM4JRZSIMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGRHT6Q#issuecomment-564296186>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5S2SWIWAA6LAFI7NZVLGLQYAMQ7ANCNFSM4JRZSIMA>
.
|
There is no need for that as it's not an http2 bug |
You’re correct, as the same error happened when using Node’s I’m still trying to run it on another OS — the proxy at work is draconian. |
Sorry about the radio silence — holidays. I couldn’t reproduce the bug on Ubuntu. When running ImageOptim on some of my referenced image assets while
This seems like it might be related. Do you have any ideas on how I might experiment to confirm or deny this hypothesis? |
As for what would be modifying the files, I’m not sure, but it could explain why I was never able to find a pattern to the sporadic errors. Some possible sources:
|
I have the same issue. |
I am seeing a similar error that seems to only happen to Safari interacting with fastify-static. It seems to happen most often on iPhone Safari 604.1.
I will investigate some more to see if I can figure out the cause for my products. |
I was able to reproduce it via refreshing Safari repetitively and closing it during one of those refreshes. It doesn't always happen, anyone know better way to abruptly close a connection? |
Send back a big file and close the socket, I think it could be done with any client at this point |
I'm able to reproduce this as advised by playing a big video file in Safari and pausing playback / refreshing the page. The error message in the logs seems to be a red herring as closing the socket is entirely expected behaviour caused by browsers trying to save bandwidth and stopping unnecessary data transfers. |
I'm not sure it is "expected" since the error should be thrown when the client doesn't close the stream. Is the browser cutting the connections? It would be good if you could share the example to understand better the case and if it is a browser-dependand issue |
Yes |
For anyone currently with this issue: I was able to fix it by taking the README’s advice and using a local copy of NGiNX to serve static files instead, proxying to the Fastify server for everything else. |
I have been investigating this to round it off - and have found the following: It's easy to reproduce the reported warning and error by interrupting a stream in an open connection with the client (I did this using autocannon - see details below). I think the behaviour is expected. I tried the same with
When the number of requests is predefined, and no connection is interrupted - there is no error counted requests (not timed) with compression |
can anyone reproduce the reported crash? |
Closing for now. |
🐛 Bug Report
Seemingly at random,
fastify-static
will fail to serve a static file.fastify-compress
Stack trace:
Error log in console:
To Reproduce
Steps to reproduce the behavior:
fastify-static
Paste your code here:
This plugin is then registered like so:
Expected behavior
A clear and concise description of what you expected to happen.
Paste the results here:
Your Environment
The text was updated successfully, but these errors were encountered: