Forgejo with Patchii patches
Find a file
Gusted 9cf501f1af
[GITEA] Add slow SQL query warning
- Databases are one of the most important parts of Forgejo, every
interaction with Forgejo uses the database in one way or another.
Therefore, it is important to maintain the database and recognize when
Forgejo is not doing well with the database. Forgejo already has the
option to log *every* SQL query along with its execution time, but
monitoring becomes impractical for larger instances and takes up
unnecessary storage in the logs.
- Add a QoL enhancement that allows instance administrators to specify a
threshold value beyond which query execution time is logged as a warning
in the xorm logger. The default value is a conservative five seconds to
avoid this becoming a source of spam in the logs.
- The use case for this patch is that with an instance the size of Codeberg, monitoring SQL logs is not very fruitful and most of them are uninteresting. Recently, in the context of persistent deadlock issues (https://codeberg.org/forgejo/forgejo/issues/220), I have noticed that certain queries hold locks on tables like comment and issue for several seconds. This patch helps to identify which queries these are and when they happen.
- Added unit test.

(cherry picked from commit 24bbe7886f)
(cherry picked from commit 6e29145b3c)
(cherry picked from commit 63731e3071)
(cherry picked from commit 3ce1a09736)
(cherry picked from commit a64426907d)
(cherry picked from commit 4b19215691)
(cherry picked from commit e635674435)
2023-10-02 19:23:41 +02:00
.devcontainer
.forgejo [TESTS] upgrade tests for storage 2023-10-02 17:06:23 +02:00
.gitea [WORKFLOW] yaml issue templates 2023-10-02 17:06:23 +02:00
.github
assets
build
cmd
contrib
custom/conf [GITEA] add option for banning dots in usernames 2023-10-02 19:00:59 +02:00
docker
docs
models [GITEA] Add slow SQL query warning 2023-10-02 19:23:41 +02:00
modules [GITEA] Add slow SQL query warning 2023-10-02 19:23:41 +02:00
options [GITEA] add option for banning dots in usernames 2023-10-02 19:00:59 +02:00
public [FEAT] add Forgero Git Service 2023-10-02 17:06:23 +02:00
releases/images
routers [GITEA] Improve HTML title on repositories 2023-10-02 19:23:24 +02:00
services [GITEA] Show manual cron run's last time 2023-10-02 19:00:59 +02:00
snap
templates [GITEA] Improve HTML title on repositories 2023-10-02 19:23:24 +02:00
tests [GITEA] Improve HTML title on repositories 2023-10-02 19:23:24 +02:00
web_src [FEAT] add Forgero Git Service 2023-10-02 17:06:23 +02:00
.air.toml
.changelog.yml
.dockerignore
.drone.yml
.editorconfig
.eslintrc.yaml
.gitattributes [META] Use correct language for .tmpl 2023-10-02 17:06:22 +02:00
.gitignore
.gitpod.yml
.golangci.yml
.ignore
.markdownlint.yaml
.npmrc
.spectral.yaml
.stylelintrc.yaml
.yamllint.yaml
BSDmakefile
build.go
CHANGELOG.md
CODEOWNERS [META] Add CODEOWNERS files 2023-10-02 17:06:23 +02:00
CONTRIBUTING.md
DCO
Dockerfile
Dockerfile.rootless
go.mod
go.sum
LICENSE
main.go [SEMVER] store SemVer in ForgejoSemVer after a database upgrade 2023-10-02 17:06:23 +02:00
MAINTAINERS
Makefile [SEMVER] store SemVer in ForgejoSemVer after a database upgrade 2023-10-02 17:06:23 +02:00
package-lock.json
package.json
playwright.config.js
poetry.lock
poetry.toml
pyproject.toml
README.md
RELEASE-NOTES.md
vitest.config.js
webpack.config.js

Welcome to Forgejo

Hi there! Tired of big platforms playing monopoly? Providing Git hosting for your project, friends, company or community? Forgejo (/for'd͡ʒe.jo/ inspired by forĝejo the Esperanto word for forge) has you covered with its intuitive interface, light and easy hosting and a lot of builtin functionality.

Forgejo was created in 2022 because we think that the project should be owned by an independent community. If you second that, then Forgejo is for you! Our promise: Independent Free/Libre Software forever!

What does Forgejo offer?

If you like any of the following, Forgejo is literally meant for you:

  • Lightweight: Forgejo can easily be hosted on nearly every machine. Running on a Raspberry? Small cloud instance? No problem!
  • Project management: Besides Git hosting, Forgejo offers issues, pull requests, wikis, kanban boards and much more to coordinate with your team.
  • Publishing: Have something to share? Use releases to host your software for download, or use the package registry to publish it for docker, npm and many other package managers.
  • Customizable: Want to change your look? Change some settings? There are many config switches to make Forgejo work exactly like you want.
  • Powerful: Organizations & team permissions, CI integration, Code Search, LDAP, OAuth and much more. If you have advanced needs, Forgejo has you covered.
  • Privacy: From update checker to default settings: Forgejo is built to be privacy first for you and your crew.
  • Federation: (WIP) We are actively working to connect software forges with each other through ActivityPub, and create a collaborative network of personal instances.

Learn more

Dive into the documentation, subscribe to releases and blog post on our website, find us on the Fediverse or hop into our Matrix room if you have any questions or want to get involved.

Get involved

If you are interested in making Forgejo better, either by reporting a bug or by changing the governance, please take a look at the contribution guide.