Forum: NGINX X-Accel-Redirect error:Value too large for defined data type

Posted by Kev Yau (kevyau)
on 2010-02-03 19:22
Using REE 1.8.7, rails 2.3.5, with phusion passenger 2.2.9 and nginx
just setup X-Accel-Redirect, to replace the send_data and send_file
calls on our web app, however, we seem to be getting an error for pdf
and rtf documents which are greater than 10kb, Therefore pdf/rtf
downloads to the browser are incomplete and won't open.

The error logs showing in the nginx errors.log displays:
"(75: Value too large for defined data type in nginx error log)"

The pdf/rtf documents are no greater than around 350kb, hardly anything
at all.

tried declaring the "response.headers['Content-Size]" to the size of the
pdf/rtf and also in the nginx.conf, set the "client_max_body_size" to
50M.

Any ideas?
Posted by Kev Yau (kevyau)
on 2010-02-03 21:01
Kev Yau wrote:
> Using REE 1.8.7, rails 2.3.5, with phusion passenger 2.2.9 and nginx
> just setup X-Accel-Redirect, to replace the send_data and send_file
> calls on our web app, however, we seem to be getting an error for pdf
> and rtf documents which are greater than 10kb, Therefore pdf/rtf
> downloads to the browser are incomplete and won't open.
> 
> The error logs showing in the nginx errors.log displays:
> "(75: Value too large for defined data type in nginx error log)"
> 
> The pdf/rtf documents are no greater than around 350kb, hardly anything
> at all.
> 
> tried declaring the "response.headers['Content-Size]" to the size of the
> pdf/rtf and also in the nginx.conf, set the "client_max_body_size" to
> 50M.
> 
> Any ideas?

Looks like the problem is gzip related on nginx. By adding the mime 
types "application/rtf" and "application/pdf" to the 'gzip_types' in the 
nginx.conf fixed the problem.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.