What is the directory "/usr/lib/nextcloudService/profiler" for (very big size)?

Nextcloud version (eg, 20.0.5): 24.0.4
Operating system and version (eg, Ubuntu 20.04): Debian Linux 6.1.11-meson64 aarch64
PHP version (eg, 7.4): 7.4.33

The issue you are facing:
I found directory “/usr/lib/nextcloudService/profiler” is about 17Gb. There are so many subdirectories inside.

  1. For what is this directory?
  2. Can i delete it?

My nextcloud system report here

report

Server configuration detail

Operating system: Linux 6.1.11-meson64 #23.02.2 SMP PREEMPT Sat Feb 18 00:07:55 UTC 2023 aarch64

Webserver: Apache (fpm-fcgi)

Database: mysql 10.5.18

PHP version: 7.4.33

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 24.0.4 - 24.0.4.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.10.0
 - activity: 2.16.0
 - bruteforcesettings: 2.4.0
 - circles: 24.0.1
 - cloud_federation_api: 1.7.0
 - comments: 1.14.0
 - contactsinteraction: 1.5.0
 - dav: 1.22.0
 - federatedfilesharing: 1.14.0
 - federation: 1.14.0
 - files: 1.19.0
 - files_pdfviewer: 2.5.0
 - files_rightclick: 1.3.0
 - files_sharing: 1.16.2
 - files_trashbin: 1.14.0
 - files_versions: 1.17.0
 - files_videoplayer: 1.13.0
 - firstrunwizard: 2.13.0
 - groupfolders: 12.0.2
 - integration_google: 1.0.9
 - logreader: 2.9.0
 - lookup_server_connector: 1.12.0
 - maps: 0.2.2
 - nextcloud_announcements: 1.13.0
 - notifications: 2.12.0
 - oauth2: 1.12.0
 - occweb: 0.1.0
 - password_policy: 1.14.0
 - photos: 1.6.0
 - privacy: 1.8.0
 - provisioning_api: 1.14.0
 - recommendations: 1.3.0
 - serverinfo: 1.14.0
 - settings: 1.6.0
 - sharebymail: 1.14.0
 - support: 1.7.0
 - survey_client: 1.12.0
 - systemtags: 1.14.0
 - text: 3.5.1
 - theming: 1.15.0
 - twofactor_backupcodes: 1.13.0
 - updatenotification: 1.14.0
 - user_status: 1.4.0
 - viewer: 1.8.0
 - weather_status: 1.4.0
 - workflowengine: 2.6.0
Disabled:
 - admin_audit
 - dashboard: 7.4.0
 - encryption
 - facerecognition
 - files_external
 - user_ldap

Configuration (config/config.php)
{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "cloud.pro",
        "*"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "24.0.4.1",
    "hashingThreads": 4,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0
    },
    "overwrite.cli.url": "https:\/\/cloud.pro\/nextcloud",
    "overwritehost": "cloud.pro",
    "auth.bruteforce.protection.enabled": false,
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "forwarded_for_headers": [
        "HTTP_X_FORWARDED",
        "HTTP_FORWARDED_FOR"
    ],
    "htaccess.RewriteBase": "\/nextcloud",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "profiler": true,
    "logfile": "\/usr\/lib\/nextcloudService\/nextcloud.log",
    "loglevel": "2",
    "log_rotate_size": "104857600",
    "enable_previews": true,
    "preview_max_x": "2048",
    "preview_max_y": "2048",
    "preview_max_memory": 256,
    "share_folder": "\/share",
    "app_install_overwrite": [
        "occweb"
    ],
    "jpeg_quality": "60",
    "debug": false,
    "maintenance": false,
    "theme": "",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "PLAIN",
    "maintenance_window_start": 8
}

Cron Configuration: Array
(
[backgroundjobs_mode] => cron
[lastcron] => 1681734909
)

External storages: files_external is disabled

Encryption: no

User-backends:

  • OC\User\Database

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Is that your data folder? Then it is perhaps a user profiler?

I don’t see such a folder at my setup. You don’t use the profiler app?
https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/profiler.html

It is not my data folder.
I am not using profiler, perhabs it is on by default… But when i try disable it - an error - profiler not found

This is my nextcloud data folder

and this is “profiler” folder

Try to disable profiler:

occ $ profiler:disable
                                                                There are no commands defined in the "profiler" namespace.                                                                
occ $ 

Where did you install NC? in /usr/lib/nextcloudService?

Did you manually put it there or a distribution package?

Sorry.
I found my mistake. I move profiler folder from nextcloud_data to lib directory and created symlink for it.
How can i disable this feature and can i delete nextcloud_data/profiler folder?

I don’t really know where this comes from. Depending on your setup, perhaps there is something specific to the setup/install that can explain this (some profiling activated, or some apps responsible for that).

Depends what feature it is. You can delete the link and see what happens. However, before doing anything like that do a full backup before that you can at least revert to the situation you are currently in.