-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Nginx fastcgi buffers: set better default #302
Conversation
The value of "8 8k" results in a 64KB buffer size. This buffer size should be slightly bigger than the average response size. The higher this value is over your average response size, the more memory is wasted on each request.
Anyone who wants to help on this PR can run this command and paste the results: Note: you may need to adjust the name/path of echo $(( `awk '($9 ~ /200/)' access.log | awk '{print $10}' | awk '{s+=$1} END {print s}'` / `awk '($9 ~ /200/)' access.log | wc -l` )) It will output the average size in bytes of your responses. |
On a couple installs:
64KB looks about right |
|
@BrandonShutter fyi going back to the original Discourse thread you had set |
@swalkinshaw I've since downsized to 64kb. Thanks! |
nginx_user: www-data | ||
strip_www: true | ||
nginx_fastcgi_buffers: 8 8k |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment with a link to https://rtcamp.com/tutorials/nginx/tweaking-fastcgi-buffers/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that URL. It says to do 32 32k
which is 1MB. They don't see to understand it multiplies them.
Should add this one: https://gist.github.com/magnetikonline/11312172
|
from production server logs:
|
another prod server:
|
So I just checked a prod server where I'm getting this: #315 But access.log.1 is |
As is mentioned in https://gist.github.com/magnetikonline/11312172, which you referenced later:
FWIW, here's the result on a site I'm currently working on:
On said site, some requests were failing with: |
@brocheafoin thanks! Interesting results. According to that gist you may actually want to set |
@swalkinshaw That's what I tried at first, but I got this error:
so I also changed |
@brocheafoin I don't know that much about it so as long as it's fixed on your end 👍 |
|
Nginx fastcgi buffers: set better default
I know this is closed, by why are we not adding the ability to set the In my |
The value of "8 8k" results in a 64KB buffer size. This buffer size should be slightly bigger than the average response size.
The higher this value is over your average response size, the more memory is wasted on each request.
Reference: #281