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

"Orphan" files in /tmp/haproxy when Site xxx does not exist increasing memory consumption #339

Open
luiz-neto-umbler opened this issue Jul 1, 2024 · 0 comments

Comments

@luiz-neto-umbler
Copy link

Hello team, we have some servers running the haproxytech/haproxy-alpine Docker image version 3.0.1 (we also tested with version 3.0.2 with Data Plane API version 2.9.4) and we noticed that the memory consumption of the servers was only increasing, with the same number of registered sites, when analyzing the container we noticed that there were several "orphan" transactions in /tmp/haproxy that are created when we remove a site that does not exist ({"code":404,"message":"missing object: Site TestServer does not exists"}), after deleting these "orphaned" files from the container and restarting, memory consumption dropped drastically.

As a test, we created a new container and ran the API creating 1000 new sites with the example command below:

curl -X POST -u ubadmin:123456 -H "Content-Type: application/json" -d '{"farms":[{"balance":{"algorithm":"roundrobin"},"mode":"tcp","name":"TestServer","servers":[{"address":"192.168.100.1","name":"TestServer","port":45397,"check":"disabled"}],"use_as":"default"}],"name":"TestServer","service":{"listeners":[{"address":"*","name":"TestServer","port":45397}],"mode":"tcp"}}' "http://127.0.0.1:5555/v2/services/haproxy/sites?version=1"

Then we delete the site and no "orphan" file is created in /tmp/haproxy:

curl -X DELETE -u ubadmin:123456 -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/services/haproxy/sites/TestServer?version=2"

But if we run the same command above, the error message that the Site does not exist is returned, the "orphan" transaction file is created in /tmp/haproxy and memory consumption increases:

curl -X DELETE -u ubadmin:123456 -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/services/haproxy/sites/TestServer?version=3"
{"code":404,"message":"missing object: Site TestServer does not exist"}

With each execution of the above command on a non-existent site, the container's memory consumption increases by approximately 40MB.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant