nextcloud-docker-dev icon indicating copy to clipboard operation
nextcloud-docker-dev copied to clipboard

Profiler enabled while application profiler is not

Open come-nc opened this issue 1 year ago • 4 comments

https://github.com/juliushaertl/nextcloud-docker-dev/blob/dca6126821ffdc674333b87901236440669fe2e5/docker/configs/default.config.php#L12

The default configuration enables the profiler, even if the profiler application is not there. Because of that, sync jobs for LDAP users are running out of memory, because the profile data fills it up. I chased a memory leak before finding out this was simply profiling data, as I was not aware the profiler was enabled.

WDYT @juliushaertl ?

come-nc avatar Jul 08 '24 09:07 come-nc

Fine to turn it off, though maybe we can also harden the server code a bit in that regard. We could also consider dropping some profiling data instead if it takes up some large percentage of the memory limit

juliusknorr avatar Jul 08 '24 16:07 juliusknorr

I’m wondering the same thing, should the server check somehow that the app is enabled?

come-nc avatar Jul 09 '24 15:07 come-nc

Only for the config value it seems

https://github.com/nextcloud/server/blob/dae7c159f728a90ffa53247d6e033abdae5d2bd6/lib/private/Profiler/Profiler.php#L28 https://github.com/nextcloud/server/blob/dae7c159f728a90ffa53247d6e033abdae5d2bd6/lib/private/Diagnostics/EventLogger.php#L44-L49

juliusknorr avatar Jul 10 '24 06:07 juliusknorr

I know what it does, I was wondering what it should do. I think the reasonning is that other applications could use data from the profiler so it’s too restrictive to only enable it if the app is enabled. But in practice it meanns people may have the profiler enabled and eating resources without knowing it.

come-nc avatar Jul 11 '24 13:07 come-nc