Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak accessing own traefik instance via frontend rule #1849

Closed
diacu opened this issue Jul 10, 2017 · 5 comments
Closed

Memory leak accessing own traefik instance via frontend rule #1849

diacu opened this issue Jul 10, 2017 · 5 comments

Comments

@diacu
Copy link

diacu commented Jul 10, 2017

Do you want to request a feature or report a bug?

bug

What did you do?

I started traefik in docker (either with docker or docker-compose).
docker run -d --rm -p 8080:8080 -p 80:80 -v /dev/null:/traefik.toml -v /var/run/docker.sock:/var/run/docker.sock --name traefik traefik --web --docker --docker.domain=docker.localhost --logLevel=DEBUG

What did you expect to see?

Admin interface should be accessible via localhost:8080 or traefik.docker.localhost. Accessing traefik interface using automatically set rule for frontend should work:
Host:traefik.docker.localhost

What did you see instead?

A memory leak starts immediately after accessing http://traefik.docker.localhost:80 and in 10-15 seconds 8GB of RAM is consumed.

Output of traefik version: (What version of Traefik are you using?)

Version:      v1.3.3
Codename:     raclette
Go version:   go1.8.3
Built:        2017-07-06_05:32:56PM
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml, provider, platform, ...)?

  • default config for docker

If applicable, please paste the log output in debug mode (--debug switch)

Nothing is displayed during access, but after stopping the request to http://traefik.docker.localhost:80, I get many lines like that time="2017-07-10T14:58:16Z" level=warning msg="Error forwarding to http://172.17.0.2:80, err: context canceled" . I suppose it has to do with the fact that I stopped the request.

@emilevauge emilevauge added the kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. label Jul 10, 2017
@dumyan
Copy link

dumyan commented Jul 13, 2017

I can confirm this bug on a k8s cluster. There were random 502 errors and the logs reported the same error as OP mentioned. After downgrading to 1.3.2 everything went back to normal.

@ldez ldez added priority/P0 needs hot fix kind/question a question and removed kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P0 needs hot fix labels Jul 13, 2017
@ldez
Copy link
Member

ldez commented Jul 13, 2017

When you call traefik.docker.localhost you call traefik.docker.localhost:80 but traefik.docker.localhost:80 is Traefik itself: you create a cyclic call.

If you want to show admin interface you must call traefik.docker.localhost:8080.

dashboard

@diacu
Copy link
Author

diacu commented Jul 13, 2017

Yes, I figure it out that it was a cyclic call, but shouldn't this be treated somehow? Accessing it causes a high memory leak.

@ldez
Copy link
Member

ldez commented Jul 13, 2017

@dumyan the @diacu's problem is present in all Traefik versions, downgrading don't change anything.

@diacu diacu closed this as completed Jul 13, 2017
@diacu diacu reopened this Jul 13, 2017
@traefiker
Copy link
Contributor

I'll close the issue due to inactivity but feel free to re-open if needed.

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants