gitea dump causes database query_timeout exceeded #8973

Open
opened 2025-11-02 08:24:29 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @FlyingOnion on GitHub (May 19, 2022).

Description

Database: mysql
Num of users: about 470k

Run gitea dump.

2022/05/19 14:36:18 cmd/dump.go:150:fatal() [F] Failed to dump database: Error 1907: Query execution was interrupted, query_timeout exceeded

The last row of dumped gitea-db is an INSERT INTO user statement.

Gitea Version

1.15.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Helm chart

Database

MySQL

Originally created by @FlyingOnion on GitHub (May 19, 2022). ### Description Database: mysql Num of users: about 470k Run `gitea dump`. ``` 2022/05/19 14:36:18 cmd/dump.go:150:fatal() [F] Failed to dump database: Error 1907: Query execution was interrupted, query_timeout exceeded ``` The last row of dumped gitea-db is an `INSERT INTO user` statement. ### Gitea Version 1.15.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Helm chart ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 08:24:29 -06:00
Author
Owner

@wxiaoguang commented on GitHub (May 19, 2022):

A little off-topic: I think the gitea dump isn't designed for large git site, indeed there are various problems when using the gitea dump (some are already reported in the issue list ....)

If you are running a large git site, you should have your own DevOps methods for backups ....

@wxiaoguang commented on GitHub (May 19, 2022): A little off-topic: I think the `gitea dump` isn't designed for large git site, indeed there are various problems when using the `gitea dump` (some are already reported in the issue list ....) If you are running a large git site, you should have your own DevOps methods for backups ....
Author
Owner

@supermangithu commented on GitHub (May 20, 2022):

A little off-topic: I think the gitea dump isn't designed for large git site, indeed there are various problems when using the gitea dump (some are already reported in the issue list ....)

If you are running a large git site, you should have your own DevOps methods for backups ....

This is what i mentioned before for gitea dump export about 100GB files is slow and not safe.I suggest gitea own three kinds of backup modes before.Gitea is all right for do the git version archive with small memory.On the contray, Gitlab CE need the high memory.
It need main developer and fundamental developer make a meeting to discuss and decide @lunny
and main developer paticipant @wxiaoguang .
Thanks in advance!
Look at these:

all about gitea dump ,transfer big sql database (backup mode)

@supermangithu commented on GitHub (May 20, 2022): > A little off-topic: I think the `gitea dump` isn't designed for large git site, indeed there are various problems when using the `gitea dump` (some are already reported in the issue list ....) > > If you are running a large git site, you should have your own DevOps methods for backups .... This is what i mentioned before for gitea dump export about 100GB files is slow and not safe.I suggest gitea own three kinds of backup modes before.Gitea is all right for do the git version archive with small memory.On the contray, Gitlab CE need the high memory. It need main developer and fundamental developer make a meeting to discuss and decide @lunny and main developer paticipant @wxiaoguang . Thanks in advance! Look at these: * https://github.com/go-gitea/gitea/issues/19640 * https://github.com/go-gitea/gitea/issues/19593 * https://github.com/go-gitea/gitea/issues/19084 * https://github.com/go-gitea/gitea/issues/19640 * https://github.com/go-gitea/gitea/issues/19699 all about gitea dump ,transfer big sql database (backup mode)
Author
Owner

@lunny commented on GitHub (May 20, 2022):

470K? There are really so many users? Is that a production system?

@lunny commented on GitHub (May 20, 2022): 470K? There are really so many users? Is that a production system?
Author
Owner

@supermangithu commented on GitHub (May 21, 2022):

470K? There are really so many users? Is that a production system?

Glad to see you reply @lunny .
Suggestion:
the following link is similar to what i mentioned. He is migrating gitea repo to gitea repo #19533 ,my qusetion #19593 use giea dump to export and transfer code to another gitea instance.Gitea dump export function need more stability.
Thanks in advance!

@supermangithu commented on GitHub (May 21, 2022): > 470K? There are really so many users? Is that a production system? Glad to see you reply @lunny . Suggestion: the following link is similar to what i mentioned. He is migrating gitea repo to gitea repo #19533 ,my qusetion #19593 use giea dump to export and transfer code to another gitea instance.Gitea dump export function need more stability. Thanks in advance!
Author
Owner

@lunny commented on GitHub (May 21, 2022):

I think you could do that with some other tools like rsync and some database hot back up tools yourselves. We should update the documentation about which content should be back up.

@lunny commented on GitHub (May 21, 2022): I think you could do that with some other tools like `rsync` and some database hot back up tools yourselves. We should update the documentation about which content should be back up.
Author
Owner

@FlyingOnion commented on GitHub (May 24, 2022):

Then what about adding a --skip-database flag to gitea dump ?

@FlyingOnion commented on GitHub (May 24, 2022): Then what about adding a `--skip-database` flag to `gitea dump` ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8973