Migrations don't seem to handle HTTP 429 responses #10303

Closed
opened 2025-11-02 09:03:41 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @sussycatgirl on GitHub (Feb 20, 2023).

Description

If the migration process receives a HTTP 429 response, the migration will fail instead of respecting the rate limit. I've encountered this while trying to migrate a large repository from Codeberg (including issues, pull requests, etc) to my own server. I don't know whether the rate limit is specific to Codeberg, but Gitea should be able to respect it - Right now it's impossible to completely migrate the linked repository.

I'm not receiving the registration email for try.gitea.io, but I was able to reproduce this on the latest gitea/gitea docker image.

Gitea Version

1.18.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

image

Git Version

No response

Operating System

No response

How are you running Gitea?

docker run -it --rm -p 3000:3000 gitea/gitea

Database

None

Originally created by @sussycatgirl on GitHub (Feb 20, 2023). ### Description If the migration process receives a HTTP 429 response, the migration will fail instead of respecting the rate limit. I've encountered this while trying to migrate [a large repository from Codeberg](https://codeberg.org/calckey/calckey) (including issues, pull requests, etc) to my own server. I don't know whether the rate limit is specific to Codeberg, but Gitea should be able to respect it - Right now it's impossible to completely migrate the linked repository. I'm not receiving the registration email for try.gitea.io, but I was able to reproduce this on the latest gitea/gitea docker image. ### Gitea Version 1.18.4 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![image](https://user-images.githubusercontent.com/26145882/220075380-d77f735e-1afc-4bec-b2fd-80c880a36680.png) ![image](https://user-images.githubusercontent.com/26145882/220074282-1d710c5b-10ac-443f-bb0a-c9c040456bbf.png) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? `docker run -it --rm -p 3000:3000 gitea/gitea` ### Database None
GiteaMirror added the issue/not-a-bug label 2025-11-02 09:03:41 -06:00
Author
Owner

@silverwind commented on GitHub (Feb 20, 2023):

Do the response headers contain Retry-After? I assume this is Codeberg-specific, but I imagine if the header is present, it might be possible to support retries of the future time is not too far off.

@silverwind commented on GitHub (Feb 20, 2023): Do the response headers contain [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)? I assume this is Codeberg-specific, but I imagine if the header is present, it might be possible to support retries of the future time is not too far off.
Author
Owner

@lunny commented on GitHub (Feb 20, 2023):

As @silverwind said, this should be a reverse proxy's response. Maybe you can post an issue in codeberg community.

@lunny commented on GitHub (Feb 20, 2023): As @silverwind said, this should be a reverse proxy's response. Maybe you can post an issue in codeberg community.
Author
Owner

@sussycatgirl commented on GitHub (Feb 20, 2023):

Do the response headers contain Retry-After?

From what I can tell they don't, but maybe Gitea could fall back to exponential backoff in such cases? Not sure if that's reasonable. In any case, I'm going to contact them in regards to adding the header.

@sussycatgirl commented on GitHub (Feb 20, 2023): > Do the response headers contain [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)? From what I can tell they don't, but maybe Gitea could fall back to exponential backoff in such cases? Not sure if that's reasonable. In any case, I'm going to contact them in regards to adding the header.
Author
Owner

@silverwind commented on GitHub (Feb 20, 2023):

As @silverwind said, this should be a reverse proxy's response. Maybe you can post an issue in codeberg community.

Do we actually have Retry-After support in gitea? I hadn't checked.

@silverwind commented on GitHub (Feb 20, 2023): > As @silverwind said, this should be a reverse proxy's response. Maybe you can post an issue in codeberg community. Do we actually have `Retry-After` support in gitea? I hadn't checked.
Author
Owner

@wxiaoguang commented on GitHub (Feb 20, 2023):

IIRC Gitea doesn't support Retry-After at the moment.

So, if:

  • Codeberg has sent the Retry-After header
  • Gitea doesn't support the Retry-After header

Then this issue could be re-opened (until someone has time to work on it .....)

@wxiaoguang commented on GitHub (Feb 20, 2023): IIRC Gitea doesn't support `Retry-After` at the moment. So, if: * Codeberg has sent the `Retry-After` header * Gitea doesn't support the `Retry-After` header Then this issue could be re-opened (until someone has time to work on it .....)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10303