Open KozhinovAlexander opened 4 weeks ago
Hi @KozhinovAlexander
Thanks for your report. What kind of package is this? It seems too large for any C or C++ package, even some of the largest packages out there are not that large.
There is a conf in Conan 1:
[general]
request_timeout = 60
That you could increase to try to pass that issue (it is in seconds) However, I am not sure this would be enough or the root cause. Because that timeout is the time without a response from the server, not the total upload time. So even for large uploads, the server shouldn't take like 60 seconds to communicate with the client.
This could be caused by other limits in Artifactory, I think it has configuration for maximum file size, for example for Cloud the max is 25Gb. If you are using some pro version, I'd suggest to reach out to their support and check these things.
Hi @KozhinovAlexander
Thanks for your report. What kind of package is this? It seems too large for any C or C++ package, even some of the largest packages out there are not that large.
Well, this is a monolithic bigger package, which bundles multiple packages to one single delivery blob. True - there is some missue. But unfortunately it was done before me and it can not be reverted as fast as I wish 😃
There is a conf in Conan 1:
[general] request_timeout = 60
That you could increase to try to pass that issue (it is in seconds) However, I am not sure this would be enough or the root cause. Because that timeout is the time without a response from the server, not the total upload time. So even for large uploads, the server shouldn't take like 60 seconds to communicate with the client.
Interestingly in my case as I vary request_timeout
parameter from 5 sec to 150 sec I can see the T
value (see screenshot below) variing accordingly, while transfer windows (red pulses) stay same of around 30sec.:
For me it looks like the corresponding request function checks for request at the end of the timeout. In my opinion it is wrong understanding of timeout. The request checks shall happen faster (maybe ~200ms) and the function shall timeout after request_timeout
value approached.
On the other hand I do not know, if artifactory server or network will kick conan client out, if it polls status every ~200ms.
What are your thoughts here?
This could be caused by other limits in Artifactory, I think it has configuration for maximum file size, for example for Cloud the max is 25Gb. If you are using some pro version, I'd suggest to reach out to their support and check these things.
This one I need to check.
For me it looks like the corresponding request function checks for request at the end of the timeout. In my opinion it is wrong understanding of timeout. The request checks shall happen faster (maybe ~200ms) and the function shall timeout after request_timeout value approached.
This is not a definition of timeout that we invented, it is the timeout
as defined by the python-requests
popular library, see https://requests.readthedocs.io/en/latest/user/advanced/#timeouts. Conan does nothing with this value, just pass it to python-requests
.
On the other hand I do not know, if artifactory server or network will kick conan client out, if it polls status every ~200ms.
What are your thoughts here?
I tend to think this is some kind of resource exhaustion, on server side, network layer (sometimes, specially in corporate networks with firewalls, vpns, proxies, etc, we have seen intermediate layers imposing limits).
For me it looks like the corresponding request function checks for request at the end of the timeout. In my opinion it is wrong understanding of timeout. The request checks shall happen faster (maybe ~200ms) and the function shall timeout after request_timeout value approached.
This is not a definition of timeout that we invented, it is the
timeout
as defined by thepython-requests
popular library, see https://requests.readthedocs.io/en/latest/user/advanced/#timeouts. Conan does nothing with this value, just pass it topython-requests
.
Ok. But it definitely impacts transfer performance. For example setting request_timeout to 10 sec. will produce 30 sec. upload and 10 sec. dead (timeout) time. Increasing request_timeout value will increase dead time accordingly (see T value in picture below). We can see now, the timeout effectively reduce a throughout. Of course it can be seen for larger packages (around 300MiBi) in total. But the behavior is there. My proposal would be: passing a value of about 200ms as a timeout to python-requests library and doing as many 200ms requests as matches into request_timeout value. In that case the upload of larger packages shall be much more performant. Also the backward compatibility shall be perfect. @memsharded Could you imagine such change?
On the other hand I do not know, if artifactory server or network will kick conan client out, if it polls status every ~200ms.
What are your thoughts here?
I tend to think this is some kind of resource exhaustion, on server side, network layer (sometimes, specially in corporate networks with firewalls, vpns, proxies, etc, we have seen intermediate layers imposing limits).
Agree. It is highly likely the problem. I investigate it with server folks.
@memsharded Could you imagine such change?
I am not sure about this. The timeouts only happen under some circumstances, where the server doesn't really respond. But this is very rarely the case. Conan is not waiting 60 seconds (the default right now) after each upload. This timeout is not something we control, so there is no way to set up a 200ms timeout then have python-requests do 200ms requests, this is internal to python-requests.
Also, we try to follow as much as possible the "experts" defaults. In this case the python-requests
default is None
which means wait for ever. We reduced that to 60 seconds, which seems a reasonable limit for any server. But trying to set it to something less than a few seconds might fail very often even for quite performant servers, note these servers load might be huge.
Agree. It is highly likely the problem. I investigate it with server folks.
Yes, in any case, the performance of transfers should be a separate discussion if anything, lets keep this ticket focused on the timeout.
@memsharded Do you have a jfrog artifactory server to reproduce the behavior? In that case I could provide you simple conan package, which reproduces mentioned timeout behavior, s.t. you see timeout impacts transfer performance.
For testing I usually use a server running locally in my computer, but that might not be the best to test real network issues.
Describe the bug
Environment details: ubuntu linux 20.04, conan v1.65
The size of the created ´my_package´ is about 8 GiBi.
Dear community - trying to upload my newly creted conan package to JFrog artifactory I get http request timeout:
Interestingly all other packages are working fine
How to reproduce it
The simpliest way to reproduce is to take a big file and package it with conan, and then upload to your artifactory.