High memory usage during DoS

During DDoS traefik (it's happening with 2.6.x, 2.8.x, and now even with 2.9.5) starts consuming memory and eventually is OOMKilled.
About 14k req/s ends with consuming about 16GB RAM.

How can I check why it is consuming memory so much?

You can enable debug and there is an api to get details.