-
Notifications
You must be signed in to change notification settings - Fork 64
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
Excessive memory usage (version 1.3.0, nginx 1.22.1) #108
Comments
Any feedback on this? Or can someone explain me how to debug this? |
More tests reveal a more accurate picture here (using top to check memory of the nginx worker, looking at VIRT and RES)
So it seams for smaller files, the RSS memory usage is matching the total size, for medium and large files around 20MB are used in the RSS per file (increased memory usage with streaming progress). This means that for a few large files, it works with reasonable memory usage. But for a large amount of files, it does not scale as the memory usage is per file. |
What's the behavior before the patch made in #67? Is worse after it? |
We see no changes in our tests when comparing 1.2 and 1.3. As it seems to be an issue depending on the number of files, we suspect something with subrequests using up memory - for example that the result of the subrequest is stored somehow in a memory buffer which seems to be capped at 20MB or so. The mentioned #67 seems to affect use cases where you have a huge amount of files only. |
The same issue we have. We created files 10000 1Mb files:
256Mb of RAM is not enough to download, memory increases all the time until OOMKill. |
We use nginx 1.22.1 with version 1.3.0 and see excessive memory usage.
We create zip files with local files only based on a manifest without CRC checksums.
For a small number of files (i.e. 3 files, total around 11GB) it is no problem, memory usage stays almost the same
For a larger number of files (i.e. 200 files, total around 2 GB) the memory usage spikes to several hundred MB and even some GB sometimes. It seems the memory usage is related to the number of files.
We are aware of #67 but this does not seem to fix the issue.
nginx information
This is running on Ubuntu 22.04
The text was updated successfully, but these errors were encountered: