Fixed
- Mirroring release assets no longer eats the machine's memory (#523).
- Each asset was held in memory while it was copied from the source to the destination, and copied again on the way, so one asset took up to about three times its size, and the memory was not given back between assets. A 300 MB asset took about 1 GB, and a repository with large assets could push the machine into swap.
- Assets now pass through a file in the data directory (
data/tmp/release-assets, next to the database), so a sync holds only a small piece of an asset at a time. In testing, a 1 GB asset peaked at about 160 MB instead of 1.3 GB. - The data directory needs free space for the largest asset while it is copied. Each file is removed after its upload, and anything a crash leaves behind is cleared after a day.
- Uploads to the destination now use chunked transfer encoding instead of a Content-Length header.
- A large repository whose first mirror took longer than five minutes no longer fails (#521, #502).
- gitea-mirror stops waiting for a request after five minutes, but Gitea and Forgejo keep importing. The first mirror failed with
Network error: The operation timed out., and Retry then failed with "not a mirror" andHTTP 400: Bad Request, because the repository has no mirror settings until the import ends. - When the migrate call gets no answer, from that timeout or from a proxy, gitea-mirror now checks the destination and follows the import if one is running. Retry, Sync and scheduled syncs also wait for a running import, up to 30 minutes.
- A failed import stays on the destination looking exactly like one still running. The message after the wait, and the "not a mirror" error, now say to delete the repository there and retry.
- gitea-mirror stops waiting for a request after five minutes, but Gitea and Forgejo keep importing. The first mirror failed with
Full changelog: v3.53.0...v3.53.1