Skip to content

CI: Retry mysterious HTTP 413 (Too Large) Coverity uploads - #2474

Closed
eduard-bagdasaryan wants to merge 6 commits into
squid-cache:masterfrom
measurement-factory:SQUID-1148-fix-ci-coverity-tests
Closed

CI: Retry mysterious HTTP 413 (Too Large) Coverity uploads#2474
eduard-bagdasaryan wants to merge 6 commits into
squid-cache:masterfrom
measurement-factory:SQUID-1148-fix-ci-coverity-tests

Conversation

@eduard-bagdasaryan

Copy link
Copy Markdown
Contributor

When our coverity-scan GitHub Actions job uploads the results produced
by cov-build to the Coverity Scan service, the upload sometimes fails
with an HTTP 413 (Request Entity Too Large) error response. By default,
curl does not treat HTTP 413 responses as intermittent errors and,
hence, does not retry them. We speculate that those errors might be
caused by Coverity misconfiguration, and that Coverity may use several
differently-configured servers behind some kind of load balancer, making
those errors worth retrying.

Besides enabling five retry attempts, this change also reports
upload-related sizes in hope to provide more information if those
retries fail to work around the problem: Curl already reports its notion
of the upload size, but that reporting is a bit odd/obscure, so we also
add a dedicated ls output. We also report raw/uncompressed upload size
now, in case Coverity is using that to limit uploads.

eduard-bagdasaryan and others added 6 commits August 5, 2026 23:55
When the "Coverity scan" Github job uploads the results produced by
cov-build to the free Coverity Scan service (scan.coverity.com) it
sometimes fails because the nginx server responds with "413 Request
Entity Too Large". The file generated by cov-build is < 300MB that
goes below the Coverity-declared limit of 500MB (special and non-trivial
configuration steps should be done for bigger files). One
possible explanation is that the intermittency of the failures is caused
by load-balanced routing, where a few of Coverity's upstream nginx edge
instances are misconfigured or have lower size limits than 500MB.

Enabling curl retry mode should probably overcome such load-balancing
nginx issue (or any other sporadic network bottlenecks/delays causing
this problem).
In my tests the results produced by the maximum (-9) xz level
compared to the the default (-6) give ~10% better compression
ratio.

@rousskov rousskov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fingers crossed.

@rousskov rousskov added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels S-could-use-an-approval An approval may speed this PR merger (but is not required) labels Aug 14, 2026
@rousskov

Copy link
Copy Markdown
Contributor

The last failed run can still be seen at https://github.com/squid-cache/squid/actions/runs/27898377216/job/82554055617:

1517 C/C++ compilation units (100%) are ready for analysis
The cov-build utility completed successfully.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 12  282M    0     0   12 35.7M      0  92.5M  0:00:03 --:--:--  0:00:03 92.3M
<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.19.10</center>
</body>
</html>
100  282M    0   184  100  282M    154   237M  0:00:01  0:00:01 --:--:--  237M
curl: (22) The requested URL returned error: 413
Error: Process completed with exit code 22.

squid-anubis pushed a commit that referenced this pull request Aug 16, 2026
When our coverity-scan GitHub Actions job uploads the results produced
by `cov-build` to the Coverity Scan service, the upload sometimes fails
with an HTTP 413 (Request Entity Too Large) error response. By default,
curl does not treat HTTP 413 responses as intermittent errors and,
hence, does not retry them. We speculate that those errors might be
caused by Coverity misconfiguration, _and_ that Coverity may use several
differently-configured servers behind some kind of load balancer, making
those errors worth retrying.

Besides enabling five retry attempts, this change also reports
upload-related sizes in hope to provide more information if those
retries fail to work around the problem: Curl already reports its notion
of the upload size, but that reporting is a bit odd/obscure, so we also
add a dedicated `ls` output. We also report raw/uncompressed upload size
now, in case Coverity is using that to limit uploads.
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Aug 16, 2026
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Aug 16, 2026
@rousskov rousskov removed the S-could-use-an-approval An approval may speed this PR merger (but is not required) label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-merged https://github.com/measurement-factory/anubis#pull-request-labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants