Artifacts upload bad gateway 502

Many times we get following errors when uploading artifacts from (on-premise, Windows7 and Windows10) gitlab-runners (12.x, 13.0.1, 13.1.0) against gitlab.com. Sometimes retry helps, sometimes have to do 2 or 3 retries.

ERROR: Uploading artifacts as "archive" to coordinator... error  error=couldn't execute POST against https://gitlab.com/api/v4/jobs/610950490/artifacts?artifact_format=zip&artifact_type=archive&expire_in=60+days: Post https://gitlab.com/api/v4/jobs/610950490/artifacts?artifact_format=zip&artifact_type=archive&expire_in=60+days: write tcp 192.168.10.117:5433->172.65.251.78:443: use of closed network connection id=610950490 token=aLwVzr2c
 WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
 WARNING: Uploading artifacts as "archive" to coordinator... failed  id=610950490 responseStatus=502 Bad Gateway status=502 Bad Gateway token=aLwVzr2c
 WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
 WARNING: Uploading artifacts as "archive" to coordinator... failed  id=610950490 responseStatus=502 Bad Gateway status=502 Bad Gateway token=aLwVzr2c
 FATAL: invalid argument                            
 ERROR: Job failed: exit status 1

Can we (as a workaround) increase the retry count for uploading artifacts ?

1 Like

Having the same issues, too. Is this a alrge artifact you’re trying to upload?

To add here a solution to this problem as we had it also and finally the question about the artifact size helped us to solve it (we involved already the IT department). The standard size for an artifact archive is 100 MB. You can easily change [it]. (http://opdw01.hg.fresenius.de/gitlab/help/user/admin_area/settings/continuous_integration#maximum-artifacts-size) The error message with bad gateway 502 is misleading here and should be changed in something more usefull.