sbom-tool icon indicating copy to clipboard operation
sbom-tool copied to clipboard

Timeout when fetching license information

Open erri120 opened this issue 1 year ago • 2 comments

The timeout of 30 seconds is a bit too short for larger projects:

##[debug]Retrieving license information for 500 components...
##[warning]Error encountered while fetching license information from API, resulting SBOM may have incomplete license information: The request was canceled due to the configured HttpClient.Timeout of 30 seconds elapsing.

Would it be possible to increase the timeout or have a configuration option?

https://github.com/microsoft/sbom-tool/blob/0b4db48ca4f235cb75d9deaff2e094f710d55b2d/src/Microsoft.Sbom.Api/Executors/LicenseInformationService.cs#L23

https://github.com/microsoft/sbom-tool/blob/0b4db48ca4f235cb75d9deaff2e094f710d55b2d/src/Microsoft.Sbom.Api/Executors/LicenseInformationService.cs#L41

erri120 avatar May 27 '24 14:05 erri120

I'm facing the same issue in what I'd consider a small project (102 components in total, 27 explicitly referenced). Maybe using a lower batchSize would help preventing timeouts: https://github.com/microsoft/sbom-tool/blob/0b4db48ca4f235cb75d9deaff2e094f710d55b2d/src/Microsoft.Sbom.Api/Executors/LicenseInformationService.cs#L34 But it would also increase the risk of hitting the documented rate limits, so all things considered, I think a configurable timeout would be the best solution.

EDIT: I tried to make a PR about this, but can't build the solution, see #687.

LucaBlackDragon avatar Aug 23 '24 07:08 LucaBlackDragon

Same here. But I don't know the root cause for the timeout. Very large project.

cz-dev-ge avatar Aug 23 '24 09:08 cz-dev-ge

We have a project with 121 components that times out every single time. Please make this configurable.

philipp-naused avatar Oct 31 '24 14:10 philipp-naused

I've submitted a PR that adds a CLI argument to configure this.

kidcline1 avatar Nov 01 '24 09:11 kidcline1

PR is #773.

erri120 avatar Nov 06 '24 10:11 erri120

Update: This will be in our next release. We have some internal dependencies that are delaying that release, but we expect this to occur sometime in February 2025. Thanks for your continued patience on this!

DaveTryon avatar Jan 22 '25 21:01 DaveTryon

This was released in version 3.1.0, released on 4 February 2025. I forgot to close this out after the release.

DaveTryon avatar Feb 18 '25 21:02 DaveTryon