Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage-Collection not working #10299

Closed
2 of 7 tasks
somera opened this issue Feb 16, 2020 · 10 comments · Fixed by #10745
Closed
2 of 7 tasks

Garbage-Collection not working #10299

somera opened this issue Feb 16, 2020 · 10 comments · Fixed by #10745
Labels
issue/stale type/enhancement An improvement of existing functionality

Comments

@somera
Copy link

somera commented Feb 16, 2020

  • Gitea version (or commit ref): 1.11.0+10-gf9e66e5a4
  • Git version: 2.20.1
  • Operating system: Linux pi-manager 4.19.97-v7l+ Fix wiki bugs #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Im starting GC in the admin dashboard ("Garbage-Collection auf Repositories ausführen"). I'm hosting 929 repositories. After start this operation I see on the monitoring page, that GC is running. But after some time the admin dashboard shows

Repository garbage collection failed: Error: context deadline exceeded

...

Screenshots

image

@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 17, 2020
@lunny
Copy link
Member

lunny commented Feb 17, 2020

We should give a different context from the default so that it has a longer timeout.

@somera
Copy link
Author

somera commented Feb 17, 2020

Or run it in background withot any timeout.

@aswild
Copy link
Contributor

aswild commented Feb 29, 2020

git gc and git fsck can take a very long time to run, often several minutes, and they should be done in the background rather than between page loads.

I've done a basic implementation on my fork (aswild@7db9db3) though it could be enhanced by firing a System Notice when complete.

@stale
Copy link

stale bot commented Apr 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale
Copy link

stale bot commented May 13, 2020

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed May 13, 2020
@somera
Copy link
Author

somera commented Jun 18, 2020

How is the status here? My hope was to get this in 1.12.0.

@jolheiser
Copy link
Member

This was reported as fixed by #10745

@somera
Copy link
Author

somera commented Jun 18, 2020

I've tested it with 1.12.0

2020/06/18 23:16:11 .../repository/check.go:87:func1() [E] Repository garbage collection failed for &{6 1 gitea_admin <nil> darktable darktable   0  master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 805148937 <nil> <nil> true false []  1568914924 1592466363}. Stdout:
        Error: context deadline exceeded
2020/06/18 23:16:11 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] INSERT INTO `notice` (`type`,`description`,`created_unix`) VALUES (?, ?, ?) [1 Repository garbage collection failed for /home/git/gitea-repositories/gitea_admin/darktable.git. Stdout:
        Error: context deadline exceeded 1592514971] - 57.066786ms
2020/06/18 23:16:11 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] INSERT INTO `notice` (`type`,`description`,`created_unix`) VALUES (?, ?, ?) [2 Error in Task: Garbage collect all repositories: Repository garbage collection failed in repo: gitea_admin/darktable: Error: <nil> 1592514971] - 12.903651ms

@zeripath
Copy link
Contributor

@somera
Copy link
Author

somera commented Jun 23, 2020

@somera did you adjust the settings in https://docs.gitea.io/en-us/config-cheat-sheet/#cron---repository-health-check-cronrepo_health_check

I tested this in 1.12.x. And it works if I set the timeout higher. Thx!

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale type/enhancement An improvement of existing functionality
Projects
None yet
5 participants