Forums

Please fix the 414 nginx error

Sort:
macgroover

If you play a game with a bot and try to analyze the game, then a 414 error is thrown if the game is over around 60 moves. This is because the game moves are put into the URL, and this is used to pull the data about the game. (Not going to comment on this being technically a pretty poor way to do this kind of thing). Since nginx doesn't by default allow URLs of indefinite length it throws an error if the game is too long. 

This has been an unfixed error for over a year. And there's really no excuse for it. It's a one line fix in your nginx settings

1. Change this setting and raise the second number such as 8k to something higher:
large_client_header_buffers 4 8k;

2. Restart the nginx server. 

3. You don't have to pay me for this free consultation. 

(8K would seem to be sufficient so perhaps you have lowered it. Triple what you have at the moment would take you to around 200 moves which would the vast majority of games). 

Note: that having a low number is not 'improving security' - the default response to many a badly set-up system. At present, you are allowing requests for games of around 60 moves so the URI allowed is pretty long already and if the cut-off is 60 to 'improve security' then that suggests you have a possible vector of attack in the URI itself would be indicative of a security issue. Indeed, it's likely that your logs are being clogged up by this error meaning that logs are not being thoroughly checked. An error occurring ONCE is too much, and especially an error that is broadcast to the user. (Even if you don't correct the error the request should fail gracefully - "Sorry, chess.com cannot analyze bot games of over 60 moves". You know use a try ... catch in your code a la Programming 101).

Chess.com is a weird mixture of brilliant functionality combined with terrible functionality. I'm constantly interspersing my 'this is great' to 'wtf' (e.g. My iPhone app has the opening explorer but my iPad app doesn't. wtf. The website has 5|5 bot games my iPhone doesn't. wtf. My iPhone has 'game setup in the bot options', the web doesn't. wtf. And enough said about the side menu the better. ) 

 I know why the area below is blank. You couldn't find decent clipart icons like you have at the top. Top tip: get rid of the ugly icons and just use words. 

macgroover

Here's the error


And here's an example of a URI which causes the error - a URI of about 12K. 



 

macgroover

Judging by the above I suspect the you have just left the 8K default in nginx. Change 8K to say 32K and the issue is solved. I've timed myself doing the same change on my server and it took 90 seconds (as opposed to the year or so you haven't fixed this issue). 

theskyishole

Seconding this.. 
Is the dev team aware of this issue?  The juice is certainly worth the squeeze to fix this.

M1m1c15
Chess.com this is like the easiest fix ever, this guy is literally giving you step by step instructions on how to fix it. Simply laziness at this point.
Martin_Stahl

There's a new version of the vs Computer code in beta testing right now and should be released site wide soon, maybe as soon as Monday According to one staff member, the game data is being passed differently so hopefully should be fixed.