Skip to content
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

Likely memory leak #49

Open
matthewlein opened this issue Jan 17, 2020 · 10 comments
Open

Likely memory leak #49

matthewlein opened this issue Jan 17, 2020 · 10 comments

Comments

@matthewlein
Copy link

Just did a release that swapped compression for "shrink-ray-current": "4.1.2", and this is the resulting memory (auto restart on a max memory limit drops it down)

Screen Shot 2020-01-17 at 9 48 58 AM

@bastiffi
Copy link

bastiffi commented Feb 11, 2020

+1, any info about this or whether it's going to be fixed?

@probil
Copy link

probil commented May 8, 2020

Got the same issue

@matthewlein
Copy link
Author

Depends on your use case, but for me all my assets run through webpack, so it was best to precompile all the brotli assets at max compression in the build, and serve them based on accepts headers. Then on-the-fly compression was not needed at all.

@Justsnoopy30
Copy link

Is there still a memory leak? Tag maintainer: @Alorel

@ajbouh
Copy link

ajbouh commented Jun 4, 2020 via email

@matthewlein
Copy link
Author

The default cacheSize is 128mb, the graph shows it filling to my auto restart limit at 1gb, so I would say unlikely unless the cache sizing doesn't work.

@ajbouh
Copy link

ajbouh commented Jun 4, 2020 via email

@matthewlein
Copy link
Author

I can't speak for anyone else, but for my setup, it was better to precompile brotli and gzip in my webpack build and just serve it based on headers. Then shrink ray was not needed.

@garthenweb
Copy link

We used this dependency for compressing html on demand (generated from a react application) and I can confirm that it has a memory leak (using the latest versions of the dependencies on NodeJS v12.20).

We saw the exact same graph as shown in the initial screenshot. After the deployment using compression middleware it is gone.

As a positive side effect our CPU consumption is also down by at least 50%. User server pre-renders a react application server side.

@drewwiens
Copy link

Brotli support seems to be one of the main benefits of shrink-ray-current compared to the compression library. If anyone else is looking for dynamic brotli compression of Express responses but are worried about issues in shrink-ray-current issue tracker, compression-next seems to be an npm publish of the most promising PR for adding brotli support in the main compression library. In any case, it seems the only realistic options right now for dynamic brotli compression of Express responses are shrink-ray-current and compression-next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants