@@ -22,34 +22,57 @@ menu:
22
22
- [ Discourse Forum] ( https://discourse.gitea.io/ )
23
23
- [ Matrix] ( https://matrix.to/#/#gitea-space:matrix.org )
24
24
- NOTE: Most of the Matrix channels are bridged with their counterpart in Discord and may experience some degree of flakiness with the bridge process.
25
+ - Chinese Support
26
+ - [ Discourse Chinese Category] ( https://discourse.gitea.io/c/5-category/5 )
27
+ - QQ Group 328432459
28
+
29
+ # Bug Report
30
+
31
+ If you found a bug, please [ create an issue on GitHub] ( https://github.com/go-gitea/gitea/issues ) .
25
32
26
33
** NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need:
27
34
28
35
1 . Your ` app.ini ` (with any sensitive data scrubbed as necessary).
29
- 2 . The Gitea logs, and any other appropriate log files for the situation.
30
- - When using systemd, use ` journalctl --lines 1000 --unit gitea ` to collect logs.
31
- - When using docker, use ` docker logs --tail 1000 <gitea-container> ` to collect logs.
32
- - By default, the logs are outputted to console. If you need to collect logs from files,
33
- you could copy the following config into your ` app.ini ` (remove all other ` [log] ` sections),
34
- then you can find the ` *.log ` files in Gitea's log directory (default: ` %(GITEA_WORK_DIR)/log ` ).
35
-
36
- ``` ini
37
- ; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
38
- [log]
39
- LEVEL =debug
40
- MODE =console,file
41
- ```
42
-
43
- 3. Any error messages you are seeing.
44
- 4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue.
45
- - This will greatly improve the chance that the root of the issue can be quickly discovered and resolved.
46
- 5. If you encounter slow/hanging/deadlock problems, please report the stack trace when the problem occurs.
36
+ 2 . Any error messages you are seeing.
37
+ 3 . The Gitea logs, and all other related logs for the situation.
38
+ - It's more useful to collect ` trace ` / ` debug ` level logs (see the next section).
39
+ - When using systemd, use ` journalctl --lines 1000 --unit gitea ` to collect logs.
40
+ - When using docker, use ` docker logs --tail 1000 <gitea-container> ` to collect logs.
41
+ 4 . Reproducible steps so that others could reproduce and understand the problem more quickly and easily.
42
+ - [ try.gitea.io] ( https://try.gitea.io ) could be used to reproduce the problem.
43
+ 5 . If you encounter slow/hanging/deadlock problems, please report the stacktrace when the problem occurs.
47
44
Go to the "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report".
48
45
49
- # # Bugs
46
+ # Advanced Bug Report Tips
47
+
48
+ ## More Config Options for Logs
49
+
50
+ By default, the logs are outputted to console with ` info ` level.
51
+ If you need to set log level and/or collect logs from files,
52
+ you could just copy the following config into your ` app.ini ` (remove all other ` [log] ` sections),
53
+ then you will find the ` *.log ` files in Gitea's log directory (default: ` %(GITEA_WORK_DIR)/log ` ).
54
+
55
+ ``` ini
56
+ ; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
57
+ [log]
58
+ LEVEL =debug
59
+ MODE =console,file
60
+ ```
50
61
51
- If you found a bug, please create an [issue on GitHub](https://github.com/go-gitea/gitea/issues).
62
+ ## Collecting Stacktrace by Command Line
63
+
64
+ Gitea could use Golang's pprof handler and toolchain to collect stacktrace and other runtime information.
65
+
66
+ If the web UI stops working, you could try to collect the stacktrace by command line:
67
+
68
+ 1 . Set ` app.ini ` :
69
+
70
+ ```
71
+ [server]
72
+ ENABLE_PPROF = true
73
+ ```
52
74
53
- # # Chinese Support
75
+ 2. Restart Gitea
54
76
55
- Support for the Chinese language is provided at [Our discourse](https://discourse.gitea.io/c/5-category/5) or QQ Group 328432459.
77
+ 3. Try to trigger the bug, when the requests get stuck for a while,
78
+ use `curl` or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` to get the stacktrace.
0 commit comments