Increasing Connection Timeout on Roles Query

Happy New Year!

I’m getting a timeout on my roles query to a custom JDBC User Storage SPI. I read in the KC source code that external roles queries are time-restricted and that default value is 3000 ms. Is there an easy command-line or kc.conf way for me to increase this value? Or, do I have to add a RoleStorageManager or other class to my SPI?

This is an example log from ServiceUtils of the error I’m trying to fix. My query is in a development environement, taking about 4000 ms. The target production platform doesn’t have this problem.

Thank you,
Carl

2024-01-01 11:00:29,989 WARN [org.keycloak.utils.ServicesUtils] (executor-thread-8) Execution with object [com.bekwam.keycloak.spi.users.JDBCUserStorageProvider@10f19216] exceeded specified time limit 3000.

This is a Keycloak source code reference

org.keycloak.storage.RoleStorageManager::searchForRolesStream

I found the answer for my version (21.1.2) on SO

spi-user-storage-provider-timeout=10000

Is there a way to configure the storageProviderTimeout in Keycloak?