Unable to get the delta token due to SocketTimeOutExcepiton : read timed out

Prashanth Ettaboina 66 Reputation points
2022-08-16T10:52:17.477+00:00

Hi Team,

I'm trying to acquire delta token for a batch of users one by one using the delta query in Graph Api.
Some of the users are able to get the latest delta token but other are failing.
Found out that the delta query is being failed due to SocketTimeOutException : read timed out.

please find the full stacktrace below

com.microsoft.graph.core.ClientException: Error executing the request  
 at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:411) ~[!/:?]  
 at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:226) ~[!/:?]  
 at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:203) ~[!/:?]  
 at com.microsoft.graph.http.BaseCollectionRequest.send(BaseCollectionRequest.java:103) ~[!/:?]  
 at com.microsoft.graph.http.BaseFunctionCollectionRequest.get(BaseFunctionCollectionRequest.java:79) ~[!/:?]  
 at com.good.gcs.graphservice.impl.GraphExecutorImpl.acquireDeltaToken(GraphExecutorImpl.java:142) [!/:?]  
 at com.good.gcs.graphservice.impl.GraphNotificationHandlerComponent.getDeltaToken(GraphNotificationHandlerComponent.java:144) [!/:?]  
 at com.good.server.notifications.graphservice.GraphNotificationProcessor.a(GraphNotificationProcessor.java:190) [!/:?]  
 at com.good.server.notifications.graphservice.GraphNotificationProcessor.processGraphNotification(GraphNotificationProcessor.java:2156) [!/:?]  
 at com.good.server.notifications.graphservice.GraphNotificationProcessor.run(GraphNotificationProcessor.java:106) [!/:?]  
 at com.google.common.util.concurrent.MoreExecutors$ScheduledListeningDecorator$NeverSuccessfulListenableFutureTask.run(MoreExecutors.java:630) [!/:?]  
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_342]  
 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_342]  
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_342]  
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_342]  
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_342]  
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_342]  
 at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342]  
Caused by: java.net.SocketTimeoutException: Read timed out  
 at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_342]  
 at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[?:1.8.0_342]  
 at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[?:1.8.0_342]  
 at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_342]  
 at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:476) ~[?:1.8.0_342]  
 at sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:470) ~[?:1.8.0_342]  
 at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70) ~[?:1.8.0_342]  
 at sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1369) ~[?:1.8.0_342]  
 at sun.security.ssl.SSLSocketImpl.access$300(SSLSocketImpl.java:73) ~[?:1.8.0_342]  
 at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:978) ~[?:1.8.0_342]  
 at okio.Okio$2.read(Okio.java:140) ~[!/:?]  
 at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) ~[!/:?]  
 at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358) ~[!/:?]  
 at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230) ~[!/:?]  
 at okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242) ~[!/:?]  
 at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.java:213) ~[!/:?]  
 at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.java:115) ~[!/:?]  
 at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:94) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[!/:?]  
 at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[!/:?]  
 at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[!/:?]  
 at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[!/:?]  
 at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[!/:?]  
 at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:152) ~[?:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[!/:?]  
 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[!/:?]  
 at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229) ~[!/:?]  
 at okhttp3.RealCall.execute(RealCall.java:81) ~[!/:?]  
 at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:408) ~[!/:?]  
 ... 17 more
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,448 questions
{count} votes