You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
12 months ago
..
_index.en-us.md
_index.zh-cn.md
adding-legal-pages.en-us.md Fix documents for "custom/public/assets/" (#28465) 1 year ago
adding-legal-pages.zh-cn.md Fix documents for "custom/public/assets/" (#28465) 1 year ago
backup-and-restore.en-us.md Update backup instructions to align with archive structure (#26902) 1 year ago
backup-and-restore.zh-cn.md Update some translations and fix markdown formatting (#29099) 1 year ago
cmd-embedded.en-us.md Enable markdownlint `no-duplicate-header` (#27500) 1 year ago
cmd-embedded.zh-cn.md Enable markdownlint `no-duplicate-header` (#27500) 1 year ago
command-line.en-us.md Add `must-change-password` cli parameter (#27626) 1 year ago
command-line.zh-cn.md Expanded minimum RSA Keylength to 3072 (#26604) 1 year ago
config-cheat-sheet.en-us.md Add slow SQL query warning (#27545) 12 months ago
config-cheat-sheet.zh-cn.md Add merge style `fast-forward-only` (#28954) 12 months ago
customizing-gitea.en-us.md Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` (#29214) 12 months ago
customizing-gitea.zh-cn.md Fix documents for "custom/public/assets/" (#28465) 1 year ago
email-setup.en-us.md Docs: Replace deprecated IS_TLS_ENABLED mailer setting in email setup (#28205) 1 year ago
email-setup.zh-cn.md Fix links in docs (#28234) 1 year ago
environment-variables.en-us.md In administration documentation about environment variables, point to those for the Go runtime instead of Go compiler (#28859) 1 year ago
environment-variables.zh-cn.md Update golang links to use https (#28980) 1 year ago
external-renderers.en-us.md Update documents to fix some links (#26885) 1 year ago
external-renderers.zh-cn.md Fix documents for "custom/public/assets/" (#28465) 1 year ago
fail2ban-setup.en-us.md Use docs.gitea.com instead of docs.gitea.io (#26739) 1 year ago
fail2ban-setup.zh-cn.md Use docs.gitea.com instead of docs.gitea.io (#26739) 1 year ago
git-lfs-support.en-us.md
git-lfs-support.zh-cn.md
https-support.en-us.md fix typo (#29212) 12 months ago
https-support.zh-cn.md Fix links in docs (#28302) 1 year ago
logging-config.en-us.md Clarify the logger's MODE config option (#26267) 2 years ago
logging-config.zh-cn.md
mail-templates.en-us.md Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` (#29214) 12 months ago
mail-templates.zh-cn.md Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` (#29214) 12 months ago
repo-indexer.en-us.md Use docs.gitea.com instead of docs.gitea.io (#26739) 1 year ago
repo-indexer.zh-cn.md Use docs.gitea.com instead of docs.gitea.io (#26739) 1 year ago
reverse-proxies.en-us.md Add docs section for sub-paths with the container registry (#27505) 1 year ago
reverse-proxies.zh-cn.md
search-engines-indexation.en-us.md Fix the robots.txt path 1 year ago
search-engines-indexation.zh-cn.md Fix the robots.txt path 1 year ago
signing.en-us.md
signing.zh-cn.md