SidewalkWebpage icon indicating copy to clipboard operation
SidewalkWebpage copied to clipboard

HTTP ERROR 414 on Validate, HTTP header is too long

Open misaugstad opened this issue 2 years ago • 8 comments

Brief description of problem/feature

@jonfroehlich ran into an issue this morning where he was getting HTTP 414 errors on the PS webpages, specifically after visiting the Validate page. image

I checked the logs, and saw this error:

org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP header is larger than 8192 bytes.
Potential solution(s)

The Play Framework documentation lists the config with the default of 8192 bytes. Though it does say "Note: You cannot use application.conf to configure the HTTP server properties", and I don't off the top of my head how else we should configure those properties.

I also haven't looked into whether 8192 bytes should be enough. It's possible that we are just loading up our HTTP headers somehow? Needs more investigation.

I'm very interested to hear if this happens again to anyone else! It sounds like a page refresh fixed it for @jonfroehlich at that moment.

misaugstad avatar Sep 05 '23 19:09 misaugstad

I got this again today (Note that I've restarted my computer and Chrome between the last time I received the 414 and today).

I went to Burnaby and clicked on labelMap then got (and hitting reload solved the problem)

image

Also got it when I went to Gallery: image

When I tried to reload Gallery, I got:

image

jonfroehlich avatar Sep 07 '23 16:09 jonfroehlich

@jonfroehlich does the first page refresh always fix the issue?

I took a quick look at the request headers on some of the requests I make to the PS servers, and I have noticed that it looks like it includes the Google Analytics cookies for all the different PS pages, and this takes up a very large chunk of the request header. This makes me think that this is much more likely to be an issue for you and I who have opened up every single PS server! Though my headers still seem to be around 4kb, while you seem to be over the 8kb max.

I'd like to see what you have in those headers! Unfortunately you can't look at those network requests in Chrome's dev tools unless you already had the dev tools open... If the problem persists when refreshing the page, then you can just open dev tools after the problem occurs, refresh, and you'll be able to find the request headers. If the first refresh always fixes it, I would appreciate it if you could try to open dev tools before loading Project Sidewalk pages for a bit until you reproduce the error and can send me the headers.

To do this, open dev tools, look at one of the console logged errors that mention a 414 error, then head to the "network" tab. Try and find that request (if you can't, just go with the request to load the page, the headers should be similar). Go to Headers -> Request Headers. A screenshot of that would be nice. But I would also like it if you could click the "raw" checkbox and send the raw text to me.

I think it's best if you send that stuff to me over DM instead of including it in the Github issue though!

misaugstad avatar Sep 07 '23 17:09 misaugstad

Gotcha. Thanks Mikey. With the CHI deadline, might not have time to make much movement on this... but it sounds like it's likely isolated to me who have used all PS pages (as you suggest).

jonfroehlich avatar Sep 07 '23 17:09 jonfroehlich

I got this again today and it nearly gave me a heart attack. Ha! I resolved by using a different browser.

image

Console doesn't tell us anything useful image

jonfroehlich avatar Sep 29 '23 12:09 jonfroehlich

@jonfroehlich did you try refeshing the page with the browser console open? I added instructions for how to (hopefully) get more info on the issue in a previous comment!

misaugstad avatar Sep 29 '23 18:09 misaugstad

I did try refreshing and it didn't seem to work... I also tried typing in other cities in the toolbar.

But I quickly determined I couldn't load any *.projectsidewalk.org city, so I switched to Edge (but also had to leave to campus so didn't followup; will do so in future)

jonfroehlich avatar Sep 29 '23 18:09 jonfroehlich

I did try refreshing and it didn't seem to work...

Making sure we're on the same page: by "it didn't work", do you mean that they page still failed to load? Or that refreshing with the browser console open still didn't show any errors in the console?

misaugstad avatar Sep 29 '23 18:09 misaugstad

Ah, sorry, I don't fully remember if I tried refreshing. I did not refresh with the console open for sure.

I also had forgotten all about your instructions, which I will pursue in the future when I see it again

jonfroehlich avatar Sep 29 '23 18:09 jonfroehlich