Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Used memory grew by more than 10 MB when executing job OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash #45189

Open
5 of 8 tasks
SystemKeeper opened this issue May 5, 2024 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug

Comments

@SystemKeeper
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

Bug description

Every few cron runs I see the warning Used memory grew by more than 10 MB when executing job OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash in the log. Running with loglevel 0 does not reveal any more details:

{
    "reqId": "ai9MUjylJUXj6YXlKtXv",
    "level": 0,
    "time": "2024-05-05T19:41:34+02:00",
    "remoteAddr": "",
    "user": "--",
    "app": "cron",
    "method": "",
    "url": "--",
    "message": "CLI cron call has selected job OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash (id: 5, arguments: null)",
    "userAgent": "--",
    "version": "29.0.0.19",
    "data": {
        "app": "cron"
    }
}
 {
    "reqId": "ai9MUjylJUXj6YXlKtXv",
    "level": 0,
    "time": "2024-05-05T19:41:34+02:00",
    "remoteAddr": "",
    "user": "--",
    "app": "cron",
    "method": "",
    "url": "--",
    "message": "Starting job OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash (id: 5, arguments: null)",
    "userAgent": "--",
    "version": "29.0.0.19",
    "data": {
        "app": "cron"
    }
}
 {
    "reqId": "ai9MUjylJUXj6YXlKtXv",
    "level": 0,
    "time": "2024-05-05T19:41:36+02:00",
    "remoteAddr": "",
    "user": "--",
    "app": "cron",
    "method": "",
    "url": "--",
    "message": "Finished job OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash (id: 5, arguments: null) in 2 seconds",
    "userAgent": "--",
    "version": "29.0.0.19",
    "data": {
        "app": "cron"
    }
}
 {
    "reqId": "ai9MUjylJUXj6YXlKtXv",
    "level": 2,
    "time": "2024-05-05T19:41:36+02:00",
    "remoteAddr": "",
    "user": "--",
    "app": "cron",
    "method": "",
    "url": "--",
    "message": "Used memory grew by more than 10 MB when executing job OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash (id: 5, arguments: null): 48.7 MB (before: 33 MB)",
    "userAgent": "--",
    "version": "29.0.0.19",
    "data": {
        "app": "cron"
    }
}

Steps to reproduce

Wait for cron to run

Expected behavior

No error.

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "...",
            "..."
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "...",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "29.0.0.19",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "log_type": "syslog",
        "logtimezone": "Europe\/Berlin",
        "logfile": "",
        "loglevel": 2,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\TIFF"
        ],
        "maintenance": false,
        "theme": "",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "preview_max_scale_factor": 1,
        "skeletondirectory": "",
        "updater.release.channel": "stable",
        "default_language": "de",
        "app_install_overwrite": [
            "tasks",
            "polls",
            "previewgenerator",
            "forms",
            "spreed",
            "groupfolders"
        ],
        "trashbin_retention_obligation": "auto, 30",
        "default_phone_region": "DE",
        "allow_local_remote_servers": true,
        "debug": false,
        "defaultapp": "files,dashboard"
    }
}

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@SystemKeeper SystemKeeper added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels May 5, 2024
@Markoise
Copy link

Markoise commented May 6, 2024

I also get this when subscribed Google Calendars are queried.

I read in the Nextcloud forum that you can increase the following value in cron.php.

if ($memoryAfter - $memoryBefore > 10_000_000) {

But I'm not sure if this is a good idea.

@solracsf
Copy link
Member

solracsf commented May 6, 2024

This is more a "hint" for developpers to (potentially, if possible) optimize code paths than something users should be worried about (unless we're talking about a great amount of RAM increase, like hundreds of MiB).

In the example above, this represents 5MiB more than the treshold of 10MiB that triggers the warning:

48.7 MB (before: 33 MB)

You can almost always safely ignore this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug
Projects
None yet
Development

No branches or pull requests

4 participants