--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/AM0PR10MB1923441C493C5DEC7FEA1B45ED409%40AM0PR10MB1923.EURPRD10.PROD.OUTLOOK.COM.
Hi Pedro,
thanks for your reply and the hint about the PR.
We will run test with this version and keep you posted about the results
Mit freundlichen Grüßen / Best regards
Jörg Matysiak
Product Area User Management (IOC/PAU1)
Bosch.IO GmbH | Stuttgarter Straße 130 | 71332 Waiblingen |
GERMANY | www.bosch.io
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling
Hi Pedro,
we tried it and the issue still occurs with the version in the mentioned PR https://github.com/keycloak/keycloak/pull/7857.
Mit freundlichen Grüßen / Best regards
Benjamin Weimer
Project Delivery Berlin 2 (IOC/PDL2)
Bosch.IO GmbH | Ziegelei 7 | 88090 Immenstaad |
GERMANY | www.bosch.io
Tel. +49 30 726112-0 | external.Ben...@bosch-si.com
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling
Hi,
we were just able to also reproduce the issue on Keycloak 11.0.3 by creating about 500 realms. Only a few objects in the cache got corrupted in the previously described way. So the performance breakdown was not as impactful as in the tests we ran on Keycloak 12.0.4. Anyways the issue seems not to be only related to the Keycloak 12 update.
Mit freundlichen Grüßen / Best regards
Benjamin Weimer
Project Delivery Berlin 2 (IOC/PDL2)
Bosch.IO GmbH | Ziegelei 7 | 88090 Immenstaad |
GERMANY | www.bosch.io
Tel. +49 30 726112-0 | external.Ben...@bosch-si.com
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/78b422e3dec2400ea27e3ce821319085%40bosch.io.
Hi,
Exactly, this happens since the “revisions” cache and “cache” cache get out of sync. An entry in “revisions” is removed without removing it from the “cache”.
This actually didn’t happen in one of our production Keycloaks. We found this during a load test of Keycloak 12. Increasing the cache size might also have the effect to not run into this bug. Running into this issue in a productive Keycloak is definitely an indicator to increase the cache size or reduce the eviction time.
Mit freundlichen Grüßen / Best regards
Benjamin Weimer
Project Delivery Berlin 2 (IOC/PDL2)
Bosch.IO GmbH | Ziegelei 7 | 88090 Immenstaad |
GERMANY |
Tel. +49 30 726112-0 | external.Ben...@bosch-si.com
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling
Von: Pedro Igor Craveiro e Silva <pigor.c...@gmail.com>
Gesendet: Freitag, 30. April 2021 18:16
An: Matysiak Joerg (IOC/PAU1) <Joerg.M...@bosch.io>
Cc: keyclo...@googlegroups.com; EXTERNAL Weimer Benjamin (TNG, IOC/PDL2) <external.Ben...@bosch.io>
Betreff: Re: [keycloak-dev] Performance/Cache issues in keycloak 12.0.4
Interesting, it makes more sense now that you were able to reproduce in 11 too.
Hi Pedro,
no matter how the cache sizes are configured, this piece of code in CacheManager.java:171 is most likely buggy:
// revisions cache has a lower value than the object.revision, so update revision and add it to cache
revisions.put(id,
object.getRevision());
if
(lifespan <
0)
cache.putForExternalRead(id,
object);
else
cache.putForExternalRead(id,
object, lifespan, TimeUnit.MILLISECONDS);
since cache.putForExternalRead calls CacheImpl.java:887 putIfAbsent(key, value, metadata, EnumUtil.mergeBitSets(PFER_FLAGS, explicitFlags), pferContextBuilder);
which, according to the documentation only adds and does not update. So the realm cache is simply not updated as the code above suggests.
Best regards,
Sebastian
Mit freundlichen Grüßen / Best regards
Dr.-Ing.
Sebastian Schuster
Project Delivery Berlin 22 (IOC/PDL22)
Bosch.IO GmbH | Ullsteinstr. 128 | 12109 Berlin | GERMANY |
www.bosch.io
Tel. +49 30 726112-485 | Mobil +49 152 02177668 | Telefax +49 30 726112-100 |
Threema / Threema Work: MF9VMEAE |
Sebastian...@bosch.io
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
keycloak-dev...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/keycloak-dev/45527df0bfe84a6998b9f99288b6d02b%40bosch.io.
Hi,
I’ve opened a JIRA issue and a PR, see
https://issues.redhat.com/projects/KEYCLOAK/issues/KEYCLOAK-17934
Mit freundlichen Grüßen / Best regards
Jörg Matysiak
Product Area User Management (IOC/PAU1)
Bosch.IO GmbH | Stuttgarter Straße 130 | 71332 Waiblingen |
GERMANY | www.bosch.io
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling