Nginx request header or cookie too large

I am obtaining a 400 Bad Repursuit request header or cookie as well large from nginx with my Rails application. Rebeginning the browser fixes the problem. I am just storing a string id in my cookie so it should be tiny.

Wright here deserve to I uncover the nginx error logs? I looked at nano /opt/nginx/logs/error.log, however it does not have anypoint associated.

I tried to set complying with and no luck:

area / large_client_header_buffers 4 32k; proxy_buffer_size 32k;nginx.conf

#user nobody;worker_procedures 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;occasions worker_relationships 1024;http passenger_root /home/app/.rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19;passenger_ruby /home/app/.rvm/wrappers/ruby-1.9.3-p392/ruby;encompass mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;client_max_body_dimension 20M;server listen 80; server_name localhost; root /home/app/myapp/current/public; passenger_allowed on; #charset koi8-r; #access_log logs/organize.accessibility.log main;# place / # large_client_header_buffers 4 32k;# proxy_buffer_size 32k;# # location / # root html; # index index.html index.htm; # client_max_body_size 4M;# client_body_buffer_size 128k;# #error_web page 404 /404.html; # redirect server error peras to the static web page /50x.html # error_web page 500 502 503 504 /50x.html; location = /50x.html root html; # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #place ~ .php$ # proxy_pass http://127.0.0.1; # # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ .php$ # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; # # deny accessibility to .htaccessibility files, if Apache"s document root # concurs with nginx"s one # #location ~ /.ht # deny all; ## one more digital hold utilizing mix of IP-, name-, and also port-based configuration##server # listen 8000;# listen somename:8080;# server_name somename alias one more.alias;# location / # root html;# index index.html index.htm;# ## HTTPS server##server # listen 443;# server_name localhost;# ssl on;# ssl_certificate cert.pem;# ssl_certificate_crucial cert.key;# ssl_session_timeout 5m;# ssl_protocols SSLv2 SSLv3 TLSv1;# ssl_ciphers HIGH:!aNULL:!MD5;# ssl_prefer_server_ciphers on;# location / # root html;# index index.html index.htm;# #Here"s my code storing the cookies and also a screenswarm of the cookies in Firebug. I offered firebug to examine stored session and also I uncovered New Relic and also jQuery are storing cookies too; can this be why the cookie dimension is exceeded?

*

def current_agency return if current_user.nil? session<:current_company_id> = current_user.suppliers.initially.id if session<:current_company_id>.blank?