[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|
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: