Skip to content

The webhook_listeners create an on-disk temp table on every SELECT DISTINCT call no matter if the table has rows #66548

Description

@banane4711

Is your feature request related to a problem? Please describe.
I am running Nextcloud 35.0.2 on a Debian 13 server with a MariaDB 11.8.6 as underlying database. The webhook_listeners are in version 2.0.0 and the tmp_table_size / max_heap_table_size is set to 96M. I found on the Nextcloud admin page, that the On-disk temp tables fails as the system uses on-disk tables with the risk of slowing down the system. During around 15 hrs I checked 2,446 on-disk temp tables of which 293 were created by webhook_listeners. Even though no webhooks are registered, the column "event" with its varchar(4000) definition - leading up to nearly 16kB in utf8mb4 causes trouble. The DISTINCT needs a unique key and the MariaDB in-memory engine cannot hold it, so it uses a temp file on disk.

SELECT DISTINCT `event` FROM `oc_webhook_listeners` WHERE `user_id_filter` = ?;
SELECT DISTINCT `event` FROM `oc_webhook_listeners` WHERE (`user_id_filter` = ?) OR (`user_id_filter` = ?);

Describe the solution you'd like
It would be appreciated, if the event list can be cached or if duplicates can be removed in PHP already, so no disk temp table is required

Describe alternatives you've considered
Raising the tmp_table_size has no effect, as the cause is a limited key length and not an index issue

Additional context
This topic is related to nextcloud/circles#3155 with a similar problem (same check, different cause) and to nextcloud/serverinfo#1224

Activity

  1. changed the title [-]The wbhook_listers create an on-disk temp table on every SELECT DISTINCT call no matter if the table has rows[/-] [+]The webhook_listers create an on-disk temp table on every SELECT DISTINCT call no matter if the table has rows[/+] on Nov 13, 2026
  2. changed the title [-]The webhook_listers create an on-disk temp table on every SELECT DISTINCT call no matter if the table has rows[/-] [+]The webhook_listeners create an on-disk temp table on every SELECT DISTINCT call no matter if the table has rows[/+] on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapenhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions