# Please help - "fastcgi request record is too big" - no idea

**URL:** <https://www.ruby-forum.com/t/please-help-fastcgi-request-record-is-too-big-no-idea/189854>\
**Category:** NGINX\
**Created:** [June 8, 2010, 10:49pm UTC](https://www.ruby-forum.com/t/please-help-fastcgi-request-record-is-too-big-no-idea/189854 "2010-06-08T22:49:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [June 8, 2010, 10:49pm UTC](https://www.ruby-forum.com/t/please-help-fastcgi-request-record-is-too-big-no-idea/189854/1 "2010-06-08T22:49:32Z")

</div>

We’re hitting this with a simple AJAX-based file upload. The file  
being uploaded is only 199862 bytes.

The debug output is here. I masked the hostnames and IPs (with the  
same length though, just in case) to protect the innocent.

> **[2010/06/08 13:04:57 \[debug\] 17899#0: \*26 recv: fd:14 1448 of 81922010/06/08 13...](https://pastebin.com/7k6PihVN)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

I am not sure if these are relevant or not, but it should be tuned to  
allow file uploads up to at least 100 megs. It works great, but for  
some reason this request is not working.

Here’s anything possibly relevant to any kind of proxy  
buffers/handling/etc/etc 😛

sendfile on;  
tcp\_nopush on;  
tcp\_nodelay on;  
ignore\_invalid\_headers on;  
client\_max\_body\_size 251m;  
client\_header\_buffer\_size 8k;  
client\_body\_buffer\_size 416k;  
large\_client\_header\_buffers 16 8k;  
keepalive\_timeout 30;

proxy\_buffer\_size 16k;  
proxy\_buffers 16 8k;

server\_names\_hash\_max\_size 4096;  
server\_names\_hash\_bucket\_size 128;

fastcgi\_ignore\_client\_abort on;  
fastcgi\_intercept\_errors on;  
fastcgi\_buffers 32 8k;  
fastcgi\_buffer\_size 8k;  
fastcgi\_busy\_buffers\_size 16k;  
fastcgi\_read\_timeout 120;  
fastcgi\_param UNTOUCHED\_BODY $request\_body;

Thank you!

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [June 8, 2010, 11:23pm UTC](https://www.ruby-forum.com/t/please-help-fastcgi-request-record-is-too-big-no-idea/189854/2 "2010-06-08T23:23:29Z")

</div>

Hello!

On Tue, Jun 08, 2010 at 01:48:16PM -0700, Michael S. wrote:

> We’re hitting this with a simple AJAX-based file upload. The file  
> being uploaded is only 199862 bytes.

[…]

> fastcgi\_param UNTOUCHED\_BODY $request\_body;

nginx assumes all fastcgi params will fit into single fastcgi  
record (i.e. no more than 64k), and usually this assumption is  
correct.

Just use normal way of passing request\_body and you’ll be fine.  
This one isn’t scalable anyway as it requires client\_body\_buffer  
to be set big enough to contain full request body.

Maxim D.
