forgejo/modules
Gusted 24bbe7886f [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.
2023-08-19 09:11:30 +00:00
..
actions [CI] Search .forgejo/workflows first 2023-08-14 08:58:53 +02:00
activitypub
analyze Rename code_langauge.go to code_language.go (#26377) 2023-08-07 15:00:53 -04:00
assetfs
auth [SECURITY] default to pbkdf2 with 320,000 iterations 2023-08-14 09:32:38 +02:00
avatar
base
cache improve unit test for caching (#26185) 2023-07-27 22:24:40 +02:00
charset
container
context Set commit id when ref used explicitly (#26447) 2023-08-12 07:33:12 +00:00
csv
doctor
emoji
eventsource
generate
git Close stdout correctly for "git blame" (#26470) 2023-08-13 02:11:20 +00:00
gitgraph
graceful Allow the use of alternative net.Listener implementations by downstreams (#25855) 2023-07-24 07:18:17 +00:00
hcaptcha
highlight
hostmatcher
html Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
httpcache
httplib
indexer [CI] disable meilisearch/elasticsearch test, no server yet in CI 2023-08-14 08:58:53 +02:00
issue/template
json
label
lfs
log
markup [GITEA] Fix media description render for orgmode 2023-08-14 12:43:56 +02:00
mcaptcha
metrics
migration
mirror
nosql
notification Refactor and enhance issue indexer to support both searching, filtering and paging (#26012) 2023-07-31 06:28:53 +00:00
options
packages Prevent newline errors with Debian packages (#26332) 2023-08-05 10:59:52 +02:00
paginator
pprof
private [CLI] implement forgejo-cli 2023-08-14 08:58:52 +02:00
process
proxy
proxyprotocol
public
queue [CI] disable redis test, no redis server yet in CI 2023-08-14 08:58:53 +02:00
recaptcha
references
regexplru
repository Refactor and enhance issue indexer to support both searching, filtering and paging (#26012) 2023-07-31 06:28:53 +00:00
secret
session
setting [GITEA] Add slow SQL query warning 2023-08-19 09:11:30 +00:00
sitemap
ssh [GITEA] Restrict certificate type for builtin SSH server 2023-08-14 12:43:56 +02:00
storage [CI] disable minio test, no minio server yet in CI 2023-08-14 08:58:53 +02:00
structs [GITEA] Add Upload URL to release API 2023-08-14 11:23:01 +02:00
svg Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
sync
system
templates Use template context function for avatar rendering (#26385) 2023-08-10 11:19:39 +08:00
test Start using template context function (#26254) 2023-08-08 01:22:47 +00:00
testlogger
timeutil
translation
turnstile
typesniffer [GITEA] Recognize OGG as an audio format 2023-08-14 12:43:56 +02:00
updatechecker
upload
uri
user
util
validation [GITEA] add option for banning dots in usernames 2023-08-14 11:23:01 +02:00
web [GITEA] add option for banning dots in usernames 2023-08-14 11:23:01 +02:00
webhook