0

a rails3.2.18 application via passenger and nginx is generating in nginx log as follows: 2014/10/20 00:31:36 [error] 85#0: *32 client intended to send too large body: 4066821 bytes, client: XX.XXX.XX.XXX, server: app3.iwant2go2.com, request: "POST /bozzadocuments/1 HTTP/1.1", host: "app3.iwant2go2.com", referrer: "http://app3.iwant2go2.com/bozzadocuments/1/edit"

The error is immediately registered after submission in the log, but the browser is getting a response between 15 and 30 seconds later. the /usr/local/etc/nginx/nginx.conf file (OSX 10.6) has been edited to allow ample body_size

worker_processes  1;

events {
    worker_connections  1024;
}


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

    client_body_in_file_only clean;
    client_body_buffer_size 32k;
    client_max_body_size 200m;
    sendfile        on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    send_timeout 300s;

    #gzip  on;

    # Phusion Passenger config
    passenger_root /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini;
    passenger_ruby /Users/jeromepmmfcamus/.rvm/rubies/ruby-1.9.3-p547/bin/ruby;
    }
}

Where is this configuration going wrong?

Jerome
  • 5,583
  • 3
  • 33
  • 76
  • You appear to have an errant '}' in the config you posted? Are you sure that file is correct and being used? – Danack Oct 20 '14 at 02:34
  • More than appear. That is an extra curly bracket. I had surmised the default parameters were being used and looked - I guess too much - at the http and server blocks... By your comment I am assuming that there is a way to know which configurations nginx is using at a given instant. (sorry if this appears as a second question) Although I've removed the errant bracket, I'm still hitting 413 errors. How can one know what configs are in use, if at all? – Jerome Oct 20 '14 at 07:55
  • http://stackoverflow.com/a/19910152/778719 – Danack Oct 20 '14 at 10:03
  • `nginx -t` returns `-bash: nginx: command not found`, while `ps -o args -C nginx` returns `ps: illegal argument: nginx` – Jerome Oct 20 '14 at 10:20
  • How were you restarting nginx to reload the new config? – Danack Oct 20 '14 at 12:08
  • Sincerely, I was re-booting the machine as `launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist` was unreactive. [just found the solution as passenger nginx install is a different path]. Still, *unhappy* with the feedback from launchctl. – Jerome Oct 20 '14 at 13:06

1 Answers1

0

I failed to recall that this installation was done via passenger.

passenger-install-nginx-module

this installs the nginx.confs under /opt/

/opt/nginx/conf/nginx.conf

A clue to that would have been to examine the contents of homebrew.mxcl.nginx.plist... and one would've gotten there faster.

Jerome
  • 5,583
  • 3
  • 33
  • 76