It’s just what the error says – Request Header Or Cookie Too Large
. One of your headers is really big, and nginx is rejecting it.
You’re on the right track with large_client_header_buffers
. If you check the docs, you’ll find it’s only valid in http
or server
contexts. Bump it up to a server block and it will work.
server { # ... large_client_header_buffers 4 32k; # ... }
By the way, the default buffer number and size is 4
and 8k
, so your bad header must be the one that’s over 8192 bytes. In your case, all those cookies (which combine to one header) are well over the limit. Those mixpanel cookies in particular get quite large.
Related Posts:
- Why Puma listen on ‘tcp://localhost:3000’ instead of ‘http://localhost:3000’
- Explain what " means
- Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000?
- ActionController::InvalidAuthenticityToken
- bundle install returns “Could not locate Gemfile”
- ActionController::InvalidAuthenticityToken
- Rails: Why “sudo” command is not recognized?
- Rails: Can’t verify CSRF token authenticity when making a POST request
- undefined method `each’ for nil:NilClass… why?
- Bundler: You must use Bundler 2 or greater with this lockfile
- undefined method `each’ for nil:NilClass… why?
- Using Pundit for all-access “super_admin” role
- How to tell if homebrew is installed on Mac OS X
- What is the difference between Rails.cache.clear and rake tmp:cache:clear?
- Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)
- Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
- Cannot load such file — bcrypt_ext
- How do I remove Permission denied @ rb_sysopen – Gem install error?
- Can’t find the ‘libpq-fe.h header when trying to install pg gem
- warning: constant ::Fixnum is deprecated When generating new model
- could not connect to server: No such file or directory (PG::ConnectionBad)
- PG::ConnectionBad: fe_sendauth: no password supplied
- curl : (1) Protocol https not supported or disabled in libcurl
- couldn’t find file ‘jquery’ with type ‘application/javascript’
- Passing parameters in rails redirect_to
- Getting: “Migrations are pending; run ‘bin/rake db:migrate RAILS_ENV=development’ to resolve this issue.” after cloning and migrating the project
- How to find out which rails version an existing rails application is built on?
- RubyMine Unit tests – Test Framework quit unexpectedly
- bcrypt LoadError: Cannot load such file
- Uninitialized constant “Controller Name”
- How do I format datetime in rails?
- heroku open – no app specified
- Difference between rake db:migrate db:reset and db:schema:load
- TypeError: no implicit conversion of Symbol into Integer
- Sass::SyntaxError: File to import not found or unreadable: bootstrap-sprockets
- An unhandled lowlevel error occurred. The application logs may have details
- How to stop (and restart) the Rails Server?
- Migrations are pending; run ‘bin/rake db:migrate RAILS_ENV=development’ to resolve this issue
- Nginx error: client intended to send too large body
- How to force or redirect to SSL in nginx?
- “413 Request Entity Too Large” in Nginx with “client_max_body_size” set
- Advanced AREL or just Rails Query for has_many through search by association
- What does ERR_SPDY_PROTOCOL_ERROR mean in nginx?
- Rails 5 ActionController::InvalidAuthenticityToken error
- HAProxy vs. Nginx
- Getting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with rails
- Nginx 403 forbidden for all files
- Node.js + Nginx – What now?
- NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream
- How to fix nginx throws 400 bad request headers on any header testing tools?
- Rails 4 RoutingError: No Route Matches
- Could not create work tree dir ‘example.com’.: Permission denied
- Purge or recreate a Ruby on Rails database
- WordPress wp-admin https redirect loop
- Fastest server stack configuration for WordPress?
- WordPress Multisite with NGINX, subfolders, and FROM a subfolder
- wp-json/ return 404, but wp-json/wp/v2/ works fine on my nginx server
- My WordPress site always displays a cached version of its homepage
- how to get a more significant error response from ServerSideRender
- Nginx rewrite rule conflict with WordPress permalinks rule
- ERR_TOO_MANY_REDIRECTS status 302, how to configure NGINX locations to work with AWS ALB?
- WordPress Installation for multi-domains with nginx and php-fpm
- PHP Code stuck in Cache [Memcached] [closed]
- nginx-fastcgi caching causes admin bar to dissapear
- Nginx with WordPress not showing template 404 for certain file types
- Permalinks for custom taxonomy stopped to work
- show shop instead of 404 page for missing products
- Moving from http to https, and www. to non-www URL
- WordPress takes too long to show 404 error on images (on LEMP stack)
- WordPress and nginx, download some pages instead of serving them
- Nginx Rewrite Rule:: index.html added to every permalink
- I get redirected too many times only in wp-admin?
- Incorrect MIME type for assets with Valet
- WordPress Network (multisite) — how to ensure each site has their own admin URL?
- NGINX rewrite rules for multisite
- My add_rewrite_rule is returning a 404
- Nginx config for NGG / NextGen Gallery [closed]
- /blog/wp-json/ nginx return 404
- WordPress – admin-ajax.php returns 502 Bad Gateway [closed]
- Some permalinks are not working and show 404
- Multiple sites with pretty permalinks with nginx
- Setup another new subdomain root on top of multisite configuration
- Do I need a DNS on a home network?
- WP permalink working, but why content doesn’t display
- How to Install WP to Subdomain but Serve on Subdirectory?
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- WordPress/NGINX not respecting the category URL for new posts
- Nginx rules for subdomain multisite install (Bedrock)
- Using www along with non-www for main domain in multisite installation
- How to rewrite rules for WP-security in Nginx?
- Pagespeed Error in Nginx
- nginx + W3 Total Cache: rewrite rules issue [closed]
- Must I install a plugin for Nginx object caching? [closed]
- Pages, aside from admin-side and the home page, read “500 Internal Server Error – nginx/1.1.19”.
- nginx + wordpress: Best practices for configuring it to be secure, reliable, and fast? [closed]
- How do you restart php-fpm?
- Make nginx to pass hostname of the upstream when reverseproxying
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- Disable caching when serving static files with Nginx (for development)
- What’s the difference between the “mainline” and “stable” branches of nginx?