Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maxRetryAttempts, connectionTimeout and readTimeout configurations #12

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

wadahiro
Copy link
Collaborator

@wadahiro wadahiro commented Oct 9, 2024

I added three new configuration options.

  • maxRetryAttempts
  • connectionTimeout
  • readTimeout

Additionally, the default timeout is set to 10 seconds. This is because the default timeout in the Box SDK is 0, meaning it will wait infinitely. In situations where the Box API does not respond correctly, this could cause midPoint thread to be blocked infinitely as the following thread stack, so the timeout is set to avoid this issue.

Thread state: WAITING
    at [email protected]/java.lang.Object.wait(Native Method)
    at [email protected]/java.lang.Object.wait(Object.java:338)
    at okhttp3.internal.http2.Http2Stream.waitForIo$okhttp(Http2Stream.kt:714)
    at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:140)
    at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:97)
    at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
    at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
    at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
    at com.box.sdk.BoxAPIConnection.executeOnClient(BoxAPIConnection.java:1258)
    at com.box.sdk.BoxAPIConnection.execute(BoxAPIConnection.java:1249)
    at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:616)
    at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:388)
    at com.box.sdk.BoxJSONRequest.send(BoxJSONRequest.java:106)
    at com.box.sdk.BoxJSONRequest.send(BoxJSONRequest.java:17)
    at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:355)
    at com.box.sdk.BoxJSONRequest.send(BoxJSONRequest.java:101)
    at com.box.sdk.BoxUser.getInfo(BoxUser.java:468)
    at com.exclamationlabs.connid.box.UsersHandler.getUser(UsersHandler.java:436)
    at com.exclamationlabs.connid.box.UsersHandler.query(UsersHandler.java:416)
    at com.exclamationlabs.connid.box.BoxConnector.executeQuery(BoxConnector.java:288)
    at com.exclamationlabs.connid.box.BoxConnector.executeQuery(BoxConnector.java:32)
    at org.identityconnectors.framework.impl.api.local.operations.SearchImpl.rawSearch(SearchImpl.java:197)
    at org.identityconnectors.framework.impl.api.local.operations.SearchImpl.search(SearchImpl.java:133)

Also update to the latest Box SDK.

@wadahiro
Copy link
Collaborator Author

wadahiro commented Oct 9, 2024

@davidandrewcope

Hi, could you review this pull request?

@davidandrewcope davidandrewcope merged commit c8456c0 into ExclamationLabs:master Oct 9, 2024
1 check passed
@wadahiro wadahiro deleted the feat-timeout branch October 10, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants