Error: RPC failed; HTTP 524 curl 22 The requested URL returned error: 524

I am trying to reduce the size of my repository, currently about 9.7GB. So I proceeded as follows:

  1. Export the project bundle from my repository.

  2. extract the downloaded project bundle.

$ tar  xzf 2022-02-22_12-50-017_my_project_export.tar.gz
  1. Clone the export project bundle.
$ git clone --bare --mirror project.bundle
Cloning into bare repository 'project.git'...
Receiving objects: 100% (1310/1310), 9.73 GiB | 44.38 MiB/s, done.
Resolving deltas: 100% (232/232), done.
  1. Change to project.git repo.
$ cd project.git
  1. Analyze repo.
$ git filter-repo --analyze
Processed 1066 blob sizes
Processed 54 commits
Writing reports to ./filter-repo/analysis...done.
  1. Purge files larger than 50M
$ git filter-repo --strip-blobs-bigger-than 50M
Processed 1066 blob sizes
Parsed 54 commits
New history written in 0.05 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
Enumerating objects: 1247, done.
Counting objects: 100% (1247/1247), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1036/1036), done.
Writing objects: 100% (1247/1247), done.
Building bitmaps: 100% (48/48), done.
Total 1247 (delta 212), reused 1181 (delta 189), pack-reused 0
Completely finished after 16.05 seconds.
  1. Delete remote origin
$ git remote remove origin
Note: Some branches outside the refs/remotes/ hierarchy were not removed;
to delete them, use:
  git branch -d dev
  git branch -d master

$ git remote add origin
  1. Force push your changes to overwrite all branches on GitLab.
$ git push origin --force 'refs/heads/*'
Username for '': arilwan
Password for '': 
Enumerating objects: 1247, done.
Writing objects: 100% (1247/1247), 2.05 GiB | 20.38 MiB/s, done.
Total 1247 (delta 0), reused 0 (delta 0), pack-reused 1247
error: RPC failed; HTTP 524 curl 22 The requested URL returned error: 524
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

Can you suggest how this could be resolved?

No answer to this yet…?

Dear Community, can someone help on how to fix this…?

For a few days I am trying just to make an initial push any local branch to remote origin, and always failing with similar error:
Writing objects: 100% (15081/15081), 1.78 GiB | 5.75 MiB/s, done.
Total 15081 (delta 8503), reused 15018 (delta 8459)
error: RPC failed; HTTP 524 curl 22 The requested URL returned error: 524
fatal: the remote end hung up unexpectedly

I have another repository with the same setup that is working just fine (so network issues are not a problem). And problematic repo has lots of files with >10MB size, maybe this is the problem?!

It is worrying that GitLab has no fix to this problem yet.