Traefik Memory keeps increasing with Souin on it
Hello, I have enabled Souin on some of my urls in my cluster and im seeing the traefik pod increase its memory infinitely
I have a ttl of 5m in Souin configuration. Is there any way to figure out whats going on?
I'm encountering a similar issue on two hosts running the Souin Traefik plugin. I'm currently using version 1.7.7 of the plugin with the following middleware configuration:
labels:
- traefik.http.middlewares.cache.plugin.souin.api.souin
- traefik.http.middlewares.cache.plugin.souin.default_cache.ttl=600s
- traefik.http.middlewares.cache.plugin.souin.default_cache.allowed_http_verbs=GET
- traefik.http.middlewares.cache.plugin.souin.default_cache.mode=bypass_request
- traefik.http.middlewares.cache.plugin.souin.default_cache.key.hide=true
- traefik.http.middlewares.cache.plugin.souin.log_level=debug
- ...
The Traefik version I'm using is 3.3.2 There is no other Souin-related configuration except the one shown above. Here are the memory metrics of the two affected Traefik instances:
@darkweak any update on this?
@darkweak as of traefik 3.5 they added the use of unsafe operations, how will this affect this middleware?
Hey @omri-shilton, sorry for the long delay. That's a memory leak in the storage itself (and probably in the patches to be Yaegi compliant). Do you have a link about the possible unsafe usage in a middleware?
@darkweak https://github.com/traefik/traefik/pull/11589?ref=containous.ghost.io https://traefik.io/blog/traefik-proxy-v3-5#:~:text=Plugin%20Development%20Evolution
@omri-shilton for your information https://github.com/traefik/traefik/issues/11954 😕
@darkweak I see that no one really acknowledged https://github.com/traefik/yaegi/issues/1702 ... can you think of a workaround for this issue? not having the memory build up? I see that the issues you created relate to the use of unsafe rather than fixing the storage leak, am I correct?
Do you have maybe an example of how I can use souin alongside traefik, not as a plugin?
I would recommend to use Caddy instead of Træfik if you're not too dependent on. I'm working on an hybrid in-memory/FS storage for Træfik that can resolve the issue but it takes time and I don't have enough free time to spend on that.
I would recommend to use Caddy instead of Træfik if you're not too dependent on. I'm working on an hybrid in-memory/FS storage for Træfik that can resolve the issue but it takes time and I don't have enough free time to spend on that.
I'm afraid we are very dependent on Træfik.. Do you have an idea of how to use Souin on the side with Træfik? Is that even possible?