Tweaking fastcgi-buffers

Following can help you tweak fastcgi_buffers size & numbers.

Maximum Response Size

awk '($9 ~ /200/)' access.log  | awk '{print $10}' | sort -nr | head -n 1

Please note we taking HTTP 200 OK response only into consideration.

Average Response Size

echo $(( `awk '($9 ~ /200/)' access.log | awk '{print $10}' | awk '{s+=$1} END {print s}'` / `awk '($9 ~ /200/)' access.log  | wc -l` ))

Based on above result, for rtCamp.com we found following values:

Avg. 24807
Max. 629622

So we are using:

fastcgi_buffers 32 32k;
fastcgi_buffer_size 32k;

Related: Nginx Log Parsing Examples

Discuss your project
with our experts

No obligation. Limited slots.

Contact Form Business Enquiry

"*" indicates required fields

Please attach any RFP, project specification, or document that you would like to share.
Drop files here or
Max. file size: 5 GB.
    This field is for validation purposes and should be left unchanged.