Seems to leak file handles
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Enable + setup notify_push app
- Open files immediately increases
Expected behaviour
The number of open files should mostly remain unchanged.
Actual behaviour
After enabling the notify_push app, the number of open files on my Nextcloud server(s) is skyrocking:
Restarting php-fpm causes the number of open files to return to normal (but only for a short amount of time).
Server configuration
Web server: Apache HTTPD
Database: MySQL
PHP version: 8.3
Nextcloud version: 30.0.5
Excerpts from lsof
# most open files are related to php-fpm
lsof | grep php-fpm | wc -l
21940
# redis seems to play a part too (runs on the same machine)
lsof | grep redis-ser | wc -l
4650
# a relatively large number of TCP connections
lsof | grep TCP | wc -l
10692
# most of those TCP connections are redis?
lsof | grep TCP | grep redis | wc -l
4679
# of course, many libraries are referenced
lsof | grep lib64 | wc -l
74546
My first assumption is that notify_push may leak redis connections, maybe they are not properly closed or they do not expire soon enough.
Browser
browser seems to be unrelated
Setting the PHP-FPM option pm.max_requests to 5000 has stabilized the situation (it reached a high number, but does not seem to increase any further). This seems to confirm the leak theory. 🤔