Welcome! Log In Create A New Profile


Shortened response

July 05, 2011 08:03AM
I'm having nginx + thin (rails) environment and somehow all my responses which are larger than 74KB are truncated to that size (ie. my json response which have up to 100KB are truncated to 74KB, same happens with larger HTMLs).

When i point browser to thin server response looks fine. Here is my nginx conf:

user xxxxxx;
worker_processes 1;

events {
worker_connections 1024;

http {
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$upstream_addr"';

access_log logs/access.log main;

sendfile on;

keepalive_timeout 65;

upstream thin {

server {
listen 80;
server_name localhost;
root /home/xxxx/Rails/yyyyy/public/;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

auth_basic "Restricted";
auth_basic_user_file htpasswd;

# don't page cache any POST requests
if ($request_method = POST) {
proxy_pass http://thin;

if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
if (!-f $request_filename) {
proxy_pass http://thin;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;


Subject Author Posted

Shortened response

pupan July 05, 2011 08:03AM

Re: Shortened response

Maxim Dounin July 05, 2011 08:24AM

Re: Shortened response

pupan July 05, 2011 08:59AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready