431 Request Header Fields Too Large

Greetings,

I have been hitting a problem with error 431 by using the nvdashboard plugin for monitoring GPUs in jupyterlab notebooks on jupyterhub, which blocks a websocket GET request to download the boken.min.js library. The end effect is that everything loads up, except the front end which should display the monitoring info with that JS library. Sadly I haven't found a way to fix this issue yet and would like to ask the community here how Traefik can be configured to set the request header size?

The closest related issue I could find was this one (but this is for body size, not header size)

I'm using traefik v1.7.24 as an ingress controller and I tried the snippet from above in my config:

  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/buffering:
      maxrequestbodybytes: 204857600
      memrequestbodybytes: 209715300
      maxresponsebodybytes: 204857610
      memresponsebodybytes: 209715200

This had no effect at all and I haven't found in the documentation any other hints.
What is the proper way to handle this?

Note: A bit more info about the issue on github (last few comments) https://github.com/rapidsai/jupyterlab-nvdashboard/issues/24

Hello @Atharex,

Traefik uses the Go net/http library to handle requests, and therefore the maximum request header field is the default Go value of 1MB (https://golang.org/pkg/net/http/?m=all#StatusRequestHeaderFieldsTooLarge).

Unfortunately this is not configurable in Traefik v1, and since it is in maintenance mode, adding such a configuration would not be accepted.

If you were to use Traefik v2, you could use it in TCP mode which would bypass all layer 7 restrictions, and/or you could request a configuration for the header max size in github.