[RTFACT-18735] Assume offline doesn't work for slow PyPI servers Created: 11/Mar/19 Updated: 06/May/19
|Project:||Artifactory Binary Repository|
|Component/s:||Artifact Storage, PyPI|
|Reporter:||Rafael Cunha de Almeida||Assignee:||Unassigned|
|Remaining Estimate:||3 days|
|Time Spent:||Not Specified|
|Original Estimate:||3 days|
|Product Comments:|| 22-Apr-2019: According to Uriah, Artifactory assumes the remote resource is offline only once the error returned is 502-505.
In this scenario, there was no response from the remote resource and therefore the repo wasn't assumed as offline.
No plans to fix at the moment (raised for the first time).
|Support Comments:|| Reproduced by Support (Ohad Levy)
01/05/19 : customer updated the Jira to improvement.
I've configured a remote PyPI repo pointing to another artifactory which was very slow. That caused read time outs while retrieving package index (either /simple/ or /simple/<pkg-name>/). However, the repo was never set as offline. That's particularly bad when that remote is part of a virtual repo, as all requests to that virtual repo will wait until the connection to the remote server times out before they respond.
It's easy to reproduce the issue using toxy (https://github.com/h2non/toxy). All you need to do is point the proxy to another artifactory instance and set the latency high (eg. 1500ms, if that's your socket timeout configuration in your remote repo). This is what my toxy configuration looks like:
I've set a test virtual repo containing a local repo and a remote pointing to http://artifactory2:3000 (I bound the proxy locally on that port). After doing that this curl would always take more than 1.5s:
As you can see, there's never a message in the logs about setting the remote index offline: