Closed NikitaZukowski closed 3 years ago
Hi @NikitaZukowski thanks for filing this issue and providing the helpful details. I have a few questions that would help us understand the issue better.
Do you continue to run into this regularly? Could you share some timestamps from when you encountered this? Do you have an HTTP proxy configured?
This appears to be a network connectivity issue, however one that should have been retried by the SDK before throwing an exception.
Yes, I run in it regularly. Not every time I call it. It is like -x--x-xx-x (where x is a failure). I do not have any proxies, I call the service from a localhost app. The retryAfterSecondsOrNull
is always null
.
Can I provide more information for this issue? I just don't know where to start.
Hi @NikitaZukowski, it would be helpful if you could give us some logs of when you encounter the issue, along with specific timestamps (in UTC or, if not, with your timezone noted so that we can compare with our internal logs).
Also, are the failures consistently repeatable with the same file over and over again? Or is it unpredictable?
I wanted to create a github repository to present the error. Thanks to it I found out that the mistake was the wrong order of opening and closing clients. Now, each method accessing the store directly opens and closes its client object itself. So this problem is solved.
Could you give me an advice if it is a good idea to keep connection alive a long time, or close them as soon as possible? Is there a max connection setting?
It depends on your situation and how your code is structured, but we encourage you to re-use the same client whenever possible. It is thread-safe, so you should be able to use the same one in multi-threaded situations as well. Reusing the same client does not mean it keeps an HTTPS connection alive indefinitely.
Okay, thanks!
Hello there
I get a strange error when I attempt to download multiple files at once:
<B2Exception 500 unexpected: unexpected: java.lang.IllegalStateException: Connection pool shut down>
The problem with this exception is that it appears occasionally when I call the download method.
What I do is following:
The
DownloadFileCallable
wraps the call for the client:The
FileDownloader
calls the client:After some debug sessions I found out that this is the actual error B2NetworkException STATUS 904:
and this
Have you any idea how this can be fixed?