XRAY: How to prevent Pypi client (or other clients) timeout when Block Unscanned Artifacts is enabled
Issue Description:
In some cases we would like to prevent downloading Artifacts before they are being scanned due to security procedures.
When downloading a newly added artifact, an event is created in Artifactory, and this event is sent to Xray notifying it of a new artifact that needs to be scanned.
When enabling the Block Unscanned Artifacts, after 60 seconds (by default) we can receive a timeout error message as the Artifact is not being scanned on time.
For a Pypi client, by default it has 5 attempts to download the package, each attempt remains open for 15 seconds. After 75 seconds and 5 unsuccessful attempts, the Pypi client will fail with a timeout error.
How To Prevent The Timeout Error
We can modify the property of the time interval between Xray and Artifactory to a smaller value which will lead to more frequent scans.
The property can be added to the artifactory.system.properties which is located under ‘$JFROG_HOME/artifactory/var/etc/artifactory/’.
‘artifactory.xray.indexer.intervalSecs=5’
** A restart is required to apply the changes.
This system property determines the interval between each artifact's events submission from Artifactory to Xray.
Looking at the example, an event is created in Artifactory every 5 seconds, and this event is sent to Xray notifying it of a new artifact that needs to be scanned.
