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

ConnectTimeoutException while Uploading pages #102

Open
dgautier opened this issue Oct 4, 2023 · 5 comments · May be fixed by #152
Open

ConnectTimeoutException while Uploading pages #102

dgautier opened this issue Oct 4, 2023 · 5 comments · May be fixed by #152
Labels
bug Something isn't working

Comments

@dgautier
Copy link

dgautier commented Oct 4, 2023

I'm getting timeout exception and can't find where it's coming from, it happens after a few pages update so maybe the server is hanging but with this stacktrace it's quite hard to defined :

io.ktor.client.network.sockets.ConnectTimeoutException: Connect timeout has expired [url=https://confluence.fake/rest/api/content?spaceKey=TEX&title=Component+058+-+title&expand=metadata.labels%2Cmetadata.properties.contenthash%2Cmetadata.properties.editor%2Cmetadata.properties.t2ctenant%2Cversion%2Cchildren.attachment%2Cancestors%2Cbody.storage, connect_timeout=unknown ms]
at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException(HttpTimeout.kt:213)
at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException$default(HttpTimeout.kt:210)
at io.ktor.client.engine.cio.Endpoint.getTimeoutException(Endpoint.kt:268)
at io.ktor.client.engine.cio.Endpoint.connect(Endpoint.kt:257)
at io.ktor.client.engine.cio.Endpoint.access$connect(Endpoint.kt:25)
at io.ktor.client.engine.cio.Endpoint$connect$1.invokeSuspend(Endpoint.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

@zeldigas zeldigas added the bug Something isn't working label Oct 4, 2023
@zeldigas
Copy link
Owner

zeldigas commented Oct 4, 2023

I'll add customizable timeouts to ease further Troubleshooting

@zeldigas
Copy link
Owner

zeldigas commented Oct 7, 2023

@dgautier added ability to customize request timeouts and enable http logging. please give it a try.

Cli can be found here: https://github.com/zeldigas/text2confl/actions/runs/6441969381?pr=105. Or use latest docker tag

@dgautier
Copy link
Author

Hi,

I've set a timeout to 30 000 and still sometime gets timeout exception.

When i do activate Info logs on requests, i don't get them anymore. Probably cause the logging process slows down every calls.

Not really sure how i could set it up to be reliable. If you have any ideas ?

@zeldigas
Copy link
Owner

zeldigas commented Oct 10, 2023

Two thoughts:

  1. This might be related to amount of concurrent requests. In this case limiting concurrency might help
  2. Might be related to http client used, in this case switching to something else like netty or native Java client might be the answer.

Let me create two builds for you to test both hypothesis

@dgautier dgautier linked a pull request Feb 16, 2024 that will close this issue
dgautier pushed a commit to text2confl/text2confl that referenced this issue Mar 4, 2024
@feliksik
Copy link

I ran into the same problem recently, it's great that there is a customizable timeout. It seems to work, but I'm not sure.

I'm not sure how I can limit concurrency, I think that would be more elegant if the number of pages is large -- ideally it would be somehow in line with how Confluence server throttles, but that's not a known, of course. Great there is this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants