0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 12:34:49 +01:00
gitea/docs/content/administration
Earl Warren b748d62b46
Add slow SQL query warning (#27545)
- Databases are one of the most important parts of Forgejo, every
interaction uses the database in one way or another. Therefore, it is
important to maintain the database and recognize when the server is not
doing well with the database. There already is 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 9cf501f1af4cd870221cef6af489618785b71186)

---------

Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
2024-02-23 00:57:24 +00:00
..
_index.en-us.md
_index.zh-cn.md
adding-legal-pages.en-us.md Fix documents for "custom/public/assets/" (#28465) 2023-12-14 08:52:16 +00:00
adding-legal-pages.zh-cn.md Fix documents for "custom/public/assets/" (#28465) 2023-12-14 08:52:16 +00:00
backup-and-restore.en-us.md
backup-and-restore.zh-cn.md Update some translations and fix markdown formatting (#29099) 2024-02-11 19:03:49 +02:00
cmd-embedded.en-us.md Enable markdownlint no-duplicate-header (#27500) 2023-10-07 15:30:21 +02:00
cmd-embedded.zh-cn.md Enable markdownlint no-duplicate-header (#27500) 2023-10-07 15:30:21 +02:00
command-line.en-us.md Add must-change-password cli parameter (#27626) 2024-02-03 19:53:27 +02:00
command-line.zh-cn.md
config-cheat-sheet.en-us.md Add slow SQL query warning (#27545) 2024-02-23 00:57:24 +00:00
config-cheat-sheet.zh-cn.md Add merge style fast-forward-only (#28954) 2024-02-12 23:37:23 +01:00
customizing-gitea.en-us.md Enable markdownlint no-trailing-punctuation and no-blanks-blockquote (#29214) 2024-02-17 13:18:05 +00:00
customizing-gitea.zh-cn.md Fix documents for "custom/public/assets/" (#28465) 2023-12-14 08:52:16 +00:00
email-setup.en-us.md Docs: Replace deprecated IS_TLS_ENABLED mailer setting in email setup (#28205) 2023-11-25 10:16:29 +08:00
email-setup.zh-cn.md Fix links in docs (#28234) 2023-11-27 00:34:40 -05:00
environment-variables.en-us.md In administration documentation about environment variables, point to those for the Go runtime instead of Go compiler (#28859) 2024-01-20 10:12:20 +08:00
environment-variables.zh-cn.md Update golang links to use https (#28980) 2024-01-30 03:11:11 +02:00
external-renderers.en-us.md
external-renderers.zh-cn.md Fix documents for "custom/public/assets/" (#28465) 2023-12-14 08:52:16 +00:00
fail2ban-setup.en-us.md
fail2ban-setup.zh-cn.md
git-lfs-support.en-us.md
git-lfs-support.zh-cn.md
https-support.en-us.md fix typo (#29212) 2024-02-17 12:01:54 +01:00
https-support.zh-cn.md Fix links in docs (#28302) 2023-12-01 19:42:42 +08:00
logging-config.en-us.md
logging-config.zh-cn.md
mail-templates.en-us.md Enable markdownlint no-trailing-punctuation and no-blanks-blockquote (#29214) 2024-02-17 13:18:05 +00:00
mail-templates.zh-cn.md Enable markdownlint no-trailing-punctuation and no-blanks-blockquote (#29214) 2024-02-17 13:18:05 +00:00
repo-indexer.en-us.md
repo-indexer.zh-cn.md
reverse-proxies.en-us.md Add docs section for sub-paths with the container registry (#27505) 2023-10-09 12:45:41 +08:00
reverse-proxies.zh-cn.md
search-engines-indexation.en-us.md Fix the robots.txt path 2023-10-11 18:01:52 +08:00
search-engines-indexation.zh-cn.md Fix the robots.txt path 2023-10-11 18:01:52 +08:00
signing.en-us.md Docusaurus-ify (#26051) 2023-07-26 04:53:13 +00:00
signing.zh-cn.md