Bad request / cookie size issue with NextGEN Gallery
-
I’m having an issue with cookie size. Thumbnail generation is failing and requires clearing the browser. There’s no way to separate scanning for new images from thumbnail generation.
I’ve preloaded a bunch of galleries with their images in the proper folders.
It looks like I need to go into each gallery and click “Scan folder for new images”. It automatically attempts to generate thumbnails. When I do this, it errors out:
Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. Cookie /n
The site is inaccessible within a given browser at this point.
With forty galleries of 20 to 30 images each to do, I find this task unpleasant. There’s no way I could deliver this to a client.
It looks like it generates a cookie for each new image, named like “X-Frame-Events_(hex)”.
Within Chrome settings under “Privacy / Content settings / All Cookies and site data” I can clear all the cookies for this domain. Then I need to login to WordPress again.
I tried to evade the problem by quickly closing the post-scan thumbnail progress window, but the cookies stick around, and until they’re cleared, there’s no way to even manually select a smaller set of images, then “Create new thumbnails”.
The alternative is tediously deleting each of the X-Frame-Events cookies. At least that leaves me logged-in.
If each cookie is at least 200 bytes, and httpd.conf’s LimitRequestFieldSize defaults to 8190, this means the header will be too large if a gallery has more than forty images. Under virtual hosting at Glowhost, I’m seeing it fail at about thirty images.
As I’ve found in googling the question, it looks like many virtual hosting environments don’t give you a way to increase LimitRequestFieldSize. Indeed, the Apache docs for LimitRequestFieldSize warn that increasing it can expose the server to denial of service attacks.
Did earlier versions of NextGEN use local storage instead of cookies?
Details: WP up to date, nextgen-gallery.2.1.23.zip, MySQL 5.5.47-cll, PHP 5.3.29, mod_rewrite on, safe mode off, Glowhost hosting, memory limit bumped in php recursively to 2048, theme Twenty Sixteen for now.
- The topic ‘Bad request / cookie size issue with NextGEN Gallery’ is closed to new replies.