-
Notifications
You must be signed in to change notification settings - Fork 35
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
HttpAdvancedIT fails with Keyclaok container insufficient memory error in Podman Jenkins jobs #2106
Comments
|
Summary of Investigations:
Executed in our Podman-based Jenkins job.
|
What about " memoryLimitMiB = 768?" What |
Output in Jenkins:
Output in Jenkins:
and test passed OK |
only the last one or both cases? |
Only the last one, with |
Both are using similar memory, so what's the difference? |
@mabartos do you have any idea why the |
That's all interesting, but as far as actual failure goes, this sentence from the issue description is what matters most:
Here is what you need to do: implement |
There are two things:
After my experiments on my local machine, the container limit was always set and I haven't spotted any issue with that. Wondering why it behaves differently in Jenkins. As values @jcarranzan Until this issue is resolved, and your workaround sets these values, it'd be good to change the |
After implementing local changes in our test framework based on @michalvavrik's suggestions, I've identified that the GzipMaxInputIT test in the http-advanced module causes a rapid spike in memory consumption from 1858MB down to 726MB of free physical memory. Additionally, the Keycloak container consistently tries to allocate 4GB of memory instead of the intended 1GB. Despite attempts to adjust the test framework in my branch(https://github.com/jcarranzan/quarkus-test-framework/pull/new/keycloak-memory-improvements) to enforce a 1GB limit, these efforts haven't been successful. As previously mentioned, this issue could be resolved by configuring the https://www.keycloak.org/keycloak-benchmark/kubernetes-guide/latest/running/jvm/jvm_options But also, disable the GzipMaxInputIT tests, Keycloak container started successfully:
|
@jcarranzan sounds like quarkus-test-service-keycloak/src/main/java/io/quarkus/test/services/containers/KeycloakGenericDockerContainerManagedResource.java should use GzipMaxInputIT - please create QQE task to investigate memory consumption characteristics of Quarkus app using gzip, something to look into before next lts. |
I'm not really sure why the container limit is not propagated in the test containers. However, as it works after experiments on my local machine, additionally there are no issues on the Keycloak side around the memory parameters, it's very unlikely it's a Keycloak issue. In production envs, the testcontainers are not used and the docker/podman memory limits are properly used. The issue should be related to the I'd say for purposes of this testsuite, setting the mentioned |
Probably more suitable solution would be:
As we would create an artificial memory limit, which will be applied and not fragile as by setting the testcontainer container memory limit. We'd be still able to use the relative heap settings defined in Keycloak, as we'd define the parameter in @jcarranzan Does it work for you? |
Yes @mabartos it works, I will test it and open a PR in our TF with my tweaks. Thanks. |
Fixed with quarkus-qe/quarkus-test-framework#1389 |
It's just failing in Podman Jenkins jobs and HttpAdvancedIT, but we use the same Keycloak service container for other tests in http-module.
Some points about my previous investigation:
The issue occurs before tests start. The failure is nor related to the HttpAdvancedIT tests. When Keycloak container tries to allocate memory ,ther's already insufficient memory due to a resource leak.
I've observed differences between Jenkins executors, Docker is 16Gb vs Podman 8 Gb, this could explains why the tests pass on Docker but fail in Podman jobs.
There was Keycloak memory adjustment in our TF with this PR(Set memory limit for Keycloak container quarkus-test-framework#1351) to limit memory usage to 1GB but did not resolve this issue on Podman jobs.
I applied a workaround in my PR(Fix not enough space error for keycloak container image quay.io/keycloak/keycloak:25.0 #2067 ) by adding :
.withProperty("JAVA_OPTS", "-Xms512m -Xmx1g")
and the test passed.The text was updated successfully, but these errors were encountered: