1

I am working on a fix to a website in the company that I work, and we got a report from one of the users that the site was taking too long to process things and was told that they got a message saying that cookies were too big.

I tried to buy several times on localhost, but everything sounds fine, I could not replicate or find a way to replicate this.

Anyone in here knows how to help me out with this?

Good help could be:

  1. a tool that could help me to find this spot that is generating a huge cookie
  2. any module that could prevent this big cookie issue
  3. I suspect that the frontend cookie might be the issue if someone has any suggestions about this (but on localhost I can't see this growing, only on the live, so I might need to test solutions over there)
  4. any tips for Nginx, I also think that might be Nginx configuration
0

I imagine your user is getting 400 Bad Request, Cookie Too Large. It's a common error so there's quite a lot of leads I could find on Google.

My suggestion is to edit nginx configuration:

  1. Find nginx virtualhost file in /etc/nginx/sites-available/ (For Linux)

  2. Add the config setting 'large_client_header_buffers' inside the server clause, like so:

    server { # ... large_client_header_buffers 4 32k; # ... }

Source: https://websiteforstudents.com/resolved-400-bad-request-request-header-or-cookie-too-large-via-nginx/


If the user keep complaining, you'll need to figure out how you can test this problem yourself. Perhaps nginx logs can provide more information when users are getting this error. Getting the referrer would be nice for you because then you know where the user is coming from when the error occurs.

0

Maybe it's the reason from your users' browers. They can clear the related cookies data when encounted the cookie too big error. If this solution now work for you, then to find the reason in your server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.