<div dir="ltr">Thomas, this test is run with whatever local database Keycloak defaults to. We&#39;re using Postgres generally, and we will have more information pertaining to tests against Postgres soon.<br><br>Stian, thanks for the tips. I am currently running a test to ingest about 50m users into the default database with the user cache disabled, 8gb mem (Xmx and Xms), and parallel GC threads == processor count.<br><br>Though my test is young (430k users ingested), I&#39;m noticing memory allocation increasing in lockstep with the number of ingested users. Is it expected to continue in this fashion, or is Keycloak designed to level off in its memory usage?<div><br></div><img src="cid:15579668607dd7962b51" alt="increasing-heap.png" class="" style="max-width: 100%; opacity: 1;"><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 21, 2016 at 4:29 PM Stian Thorgersen &lt;<a href="mailto:sthorger@redhat.com">sthorger@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Keycloak by default caches users in-memory, by default it will keep up to 10000 entries cached. You can verify that there&#39;s no leak by disabling the user cache provider. See <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/server_cache.html#d4e3187" target="_blank">http://keycloak.github.io/docs/userguide/keycloak-server/html/server_cache.html#d4e3187</a><div><br></div><div>If you&#39;re planning on having millions of users I suggest you increase the allocated memory for the JVM (512MB which it seems you have is not sufficient).</div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On 22 June 2016 at 00:29, Chris Hairfield <span dir="ltr">&lt;<a href="mailto:chairfield@gmail.com" target="_blank">chairfield@gmail.com</a>&gt;</span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>When testing Keycloak 1.9.8 by ingesting a few million users, we find that Keycloak leaks memory until it is rendered unresponsive (see graph). Increasing JVM memory only increases the time it takes to encounter this issue.</div><div><br></div><div>We have put together a test project <a href="https://github.com/anaerobic/keycloak-leakage" target="_blank">here</a> and opened an issue <a href="https://issues.jboss.org/browse/KEYCLOAK-3146" target="_blank">here</a> as we continue to investigate. As we are relying on Keycloak as a central infrastructural component, any help would be greatly appreciated.</div><div><br></div><div>We&#39;ll update with more information as we find it.</div><div><br></div><div>Thanks,<br>Chris</div><div><br></div><div><img src="cid:155750e8bae64c0eceb1" alt="mem-cpu.png" class="" style="max-width: 100%;"><br></div></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div></div></blockquote></div></div>