Closed
Description
- Gitea version (or commit ref): NA
- Git version: NA
- Operating system: NA
- Database (use
[x]
): NA- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
The hook_task table doesn't appear to be pruned at any point, so on an active site this table can grow to be very large and it makes loading the edit webhook page quite slow. I'm not sure how the action
table relates but that may need to be pruned also?
Possible Solution
One solution I thought of is to allow administrators to set a max number of deliveries to retain per webhook.
Screenshots
MySQL [(none)]> SELECT
-> table_schema as `Database`,
-> table_name AS `Table`,
-> round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
-> FROM information_schema.TABLES
-> ORDER BY (data_length + index_length) DESC;
+--------------------+------------------------------------------------------+------------+
| Database | Table | Size in MB |
+--------------------+------------------------------------------------------+------------+
| gogs | hook_task | 1723.52 |
| gogs | action | 908.06 |