# Intermittent Timeout Issue with OIDC Authentication in Keycloak v25.0.6 : 'SocketTimeoutException: Read timed out'

**URL:** <https://forum.keycloak.org/t/intermittent-timeout-issue-with-oidc-authentication-in-keycloak-v25-0-6-sockettimeoutexception-read-timed-out/30047>\
**Category:** Miscellanaeous\
**Tags:** authentication, oidc\
**Created:** [May 30, 2025, 6:09am UTC](https://forum.keycloak.org/t/intermittent-timeout-issue-with-oidc-authentication-in-keycloak-v25-0-6-sockettimeoutexception-read-timed-out/30047 "2025-05-30T06:09:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayyandurai.m](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@ayyandurai.m](https://forum.keycloak.org/u/ayyandurai.m)\
**Post date:** [May 30, 2025, 6:09am UTC](https://forum.keycloak.org/t/intermittent-timeout-issue-with-oidc-authentication-in-keycloak-v25-0-6-sockettimeoutexception-read-timed-out/30047/1 "2025-05-30T06:09:12Z")

</div>

Hi All,  
We are currently using Keycloak version **25.0.6** , and we are encountering an intermittent issue while authenticating with an **OIDC identity provider**.

Occasionally, we are getting the following error during login:

> **Failed to make identity provider oauth callback: java.net.SocketTimeoutException: Read timed out**

Due to this, users are unable to log in to the application when the error occurs.

**Note:** This issue occurs sporadically and is not consistently reproducible.

We would appreciate it if you could let us know:

- Whether there is a way to resolve this issue, and
- If it is possible to increase the timeout duration for the identity provider authentication API call.

Your assistance in resolving this issue would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [June 1, 2025, 5:55pm UTC](https://forum.keycloak.org/t/intermittent-timeout-issue-with-oidc-authentication-in-keycloak-v25-0-6-sockettimeoutexception-read-timed-out/30047/2 "2025-06-01T17:55:58Z")

</div>

That’s a timeout doing an HTTP call to the IdP. It’s not an issue with Keycloak, but with connecting to your provider. You can tweak the HTTP timeouts with the `connections-http-client` variables, defined here: [All provider configuration - Keycloak](https://www.keycloak.org/server/all-provider-config#_connections_http_client)

E.g. we were having some problems with read timeouts to high-latency endpoints, so we set `KC_SPI_CONNECTIONS_HTTP_CLIENT_DEFAULT_SOCKET_TIMEOUT_MILLIS=30000`
