Hi, I've noticed that some repositories are stuck on "Syncing" status. Is there a clean way to restart this mirror/sync? What could cause this to be stuck?
My schedule is set to mirror every 4 hours. I'm mirroring those repos to Gitea. I'm on the newest update v3.20.4.
Originally created by @mike-m24 on GitHub (Jul 8, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/339
Originally assigned to: @arunavo4 on GitHub.
Hi, I've noticed that some repositories are stuck on "Syncing" status. Is there a clean way to restart this mirror/sync? What could cause this to be stuck?
My schedule is set to mirror every 4 hours. I'm mirroring those repos to Gitea. I'm on the newest update v3.20.4.
<img width="1617" height="408" alt="Image" src="https://github.com/user-attachments/assets/68bd938b-a9ea-4975-bedb-24d446f29efd" />
Found the cause. If the app gets restarted mid-sync (update, OOM, reboot), the repo stays marked syncing in the DB and nothing ever picks it up again — the scheduler skips in-flight repos and the UI disables the sync button. Fixed in #347, stuck repos now reset themselves on startup and get retried.
To unstick right now on v3.20.4: stop the container and run
against data/gitea-mirror.db, then start it again. The repos will show a retry button and the next scheduled run picks them up.
After the next release your stuck repos should clear themselves on first boot — please give it a try and let me know.
<!-- gh-comment-id:4993720257 -->
@arunavo4 commented on GitHub (Jul 16, 2026):
Found the cause. If the app gets restarted mid-sync (update, OOM, reboot), the repo stays marked syncing in the DB and nothing ever picks it up again — the scheduler skips in-flight repos and the UI disables the sync button. Fixed in #347, stuck repos now reset themselves on startup and get retried.
To unstick right now on v3.20.4: stop the container and run
```sql
UPDATE repositories SET status='failed' WHERE status IN ('syncing','mirroring');
```
against `data/gitea-mirror.db`, then start it again. The repos will show a retry button and the next scheduled run picks them up.
After the next release your stuck repos should clear themselves on first boot — please give it a try and let me know.
<!-- gh-comment-id:4994245939 -->
@arunavo4 commented on GitHub (Jul 16, 2026):
v3.21.0 is out — your stuck repos should clear themselves on first boot after upgrading, no manual steps needed. Let me know how it goes. https://github.com/RayLabsHQ/gitea-mirror/releases/tag/v3.21.0
Hello, it looks like they are still getting stuck (I think). After fail I'm trying to sync them again but they seem to be stuck. In the repositories tab there is status "Syncing" on 4 repos but in the Activity Log there is no information on that.
There is only info saying that Mirroring is in progress:
When I look at the repo in Gitea it says for example "synced 1 hour ago".
<!-- gh-comment-id:5067184743 -->
@mike-m24 commented on GitHub (Jul 24, 2026):
Hello, it looks like they are still getting stuck (I think). After fail I'm trying to sync them again but they seem to be stuck. In the repositories tab there is status "Syncing" on 4 repos but in the Activity Log there is no information on that.
There is only info saying that Mirroring is in progress:
<img width="1596" height="317" alt="Image" src="https://github.com/user-attachments/assets/1a7b4020-0a10-42b8-a873-7eaa76983bab" />
When I look at the repo in Gitea it says for example "synced 1 hour ago".
<img width="852" height="75" alt="Image" src="https://github.com/user-attachments/assets/08621912-34da-4a76-9c77-7e21e34046f0" />
@mike-m24 can you try on a fresh install with a fresh gitea, to rule out any other issue ? And try with the same repo that's getting stuck.
<!-- gh-comment-id:5069844662 -->
@arunavo4 commented on GitHub (Jul 24, 2026):
@mike-m24 can you try on a fresh install with a fresh gitea, to rule out any other issue ? And try with the same repo that's getting stuck.
I’m not sure I can do that right now, as setting up a fresh install and a new Gitea instance would take a fair amount of time. Is there any workaround we could try first?
Also, I checked again and there is only this info in Activity log about Mirroring in progress, those 4 repos look like they're unstuck.
<!-- gh-comment-id:5070031371 -->
@mike-m24 commented on GitHub (Jul 24, 2026):
I’m not sure I can do that right now, as setting up a fresh install and a new Gitea instance would take a fair amount of time. Is there any workaround we could try first?
Also, I checked again and there is only this info in Activity log about Mirroring in progress, those 4 repos look like they're unstuck.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @mike-m24 on GitHub (Jul 8, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/339
Originally assigned to: @arunavo4 on GitHub.
Hi, I've noticed that some repositories are stuck on "Syncing" status. Is there a clean way to restart this mirror/sync? What could cause this to be stuck?
My schedule is set to mirror every 4 hours. I'm mirroring those repos to Gitea. I'm on the newest update v3.20.4.
@arunavo4 commented on GitHub (Jul 16, 2026):
Found the cause. If the app gets restarted mid-sync (update, OOM, reboot), the repo stays marked syncing in the DB and nothing ever picks it up again — the scheduler skips in-flight repos and the UI disables the sync button. Fixed in #347, stuck repos now reset themselves on startup and get retried.
To unstick right now on v3.20.4: stop the container and run
against
data/gitea-mirror.db, then start it again. The repos will show a retry button and the next scheduled run picks them up.After the next release your stuck repos should clear themselves on first boot — please give it a try and let me know.
@arunavo4 commented on GitHub (Jul 16, 2026):
v3.21.0 is out — your stuck repos should clear themselves on first boot after upgrading, no manual steps needed. Let me know how it goes. https://github.com/RayLabsHQ/gitea-mirror/releases/tag/v3.21.0
@mike-m24 commented on GitHub (Jul 24, 2026):
Hello, it looks like they are still getting stuck (I think). After fail I'm trying to sync them again but they seem to be stuck. In the repositories tab there is status "Syncing" on 4 repos but in the Activity Log there is no information on that.
There is only info saying that Mirroring is in progress:
@arunavo4 commented on GitHub (Jul 24, 2026):
@mike-m24 can you try on a fresh install with a fresh gitea, to rule out any other issue ? And try with the same repo that's getting stuck.
@mike-m24 commented on GitHub (Jul 24, 2026):
I’m not sure I can do that right now, as setting up a fresh install and a new Gitea instance would take a fair amount of time. Is there any workaround we could try first?
Also, I checked again and there is only this info in Activity log about Mirroring in progress, those 4 repos look like they're unstuck.