# Log\_rotate\_size ignored

**URL:** <https://help.nextcloud.com/t/log-rotate-size-ignored/248993>\
**Category:** ℹ️ Support\
**Tags:** nc32, nc34, app\_api, groupfolders-app, nextcloudlog\
**Created:** [September 6, 2026, 5:24pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993 "2026-09-06T17:24:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![theking2](https://help.nextcloud.com/user_avatar/help.nextcloud.com/theking2/32/78496_2.png) [@theking2](https://help.nextcloud.com/u/theking2)\
**Post date:** [September 6, 2026, 5:24pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/1 "2026-09-06T17:24:56Z")

</div>

According to this document entry : ```  
log\_rotate\_size

```auto
I set the log_rotate_size to 1024 * 1024. Yet the current log is 64 MB.

Some or all of the below information will be requested if it isn't supplied; for fastest response please provide as much as you can. :heart: 

## The Basics

* Nextcloud Server version:  
  - `Nextcloud 34.0.3`  
* Operating system and version:  
  - `#1 SMP PREEMPT Debian 1:6.18.39-1+rpt1 (2026-07-29)`  
* Web server and version:  
  - `Server version: Apache/2.4.68 (Debian)`  
* Reverse proxy and version:  
  - `nginx version: openresty/1.29.2.5`  
* PHP version:  
  - `PHP 8.5.10 (cli) (built: Aug 31 2026 19:31:34) (NTS)`
* Is this the first time you've seen this error? (Yes / No):
  - `yes`
* When did this problem seem to first start?
  - `recently`
* Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - `OMV Container`
* Are you using CloudfIare, mod_security, or similar? _(Yes / No)_
  - `No`

### Summary of the issues you are facing:

\[...\]

### Steps to replicate it (hint: details matter!):

1. 
2. 
3. 

### Log entries

#### Nextcloud

```

{“reqId”:“grONn11HrvjXc5U9g6PC”,“level”:0,“time”:“2026-09-06T17:24:36+00:00”,“remoteAddr”:“”,“user”:“–”,“app”:“PHP”,“method”:“”,“url”:“–”,“scriptName”:“/var/www/html/occ”,“message”:“Non-canonical cast (integer) is deprecated, use the (int) cast instead at /var/www/html/custom\_apps/eurooffice/lib/AppConfig.php#1294”,“userAgent”:“–”,“version”:“34.0.3.2”,“occ\_command”:[“/var/www/html/occ”,“–version”],“data”:{“app”:“PHP”}}

```auto

#### Web Browser

#### Apps

> Enabled:
> - activity: 7.0.0
> - admin_audit: 1.24.0
> - appstore: 1.0.0
> - bookmarks: 16.2.6
> - brewmemo: 0.8.0
> - bruteforcesettings: 7.0.0
> - calendar: 6.5.4
> - camerarawpreviews: 1.1.3
> - circles: 34.0.0
> - cloud_federation_api: 1.18.0
> - contacts: 8.8.0
> - contactsinteraction: 1.15.0
> - cookbook: 0.11.10
> - dashboard: 7.14.0
> - dav: 1.40.0
> - encryption: 2.22.0
> - end_to_end_encryption: 2.2.4
> - eurooffice: 11.0.4
> - federatedfilesharing: 1.24.0
> - files: 2.6.0
> - files_downloadlimit: 5.2.0
> - files_external: 1.26.0
> - files_lock: 34.0.1
> - files_pdfviewer: 7.0.0-dev.0
> - files_sharing: 1.26.0
> - files_trashbin: 1.24.0
> - files_versions: 1.27.0
> - firstrunwizard: 7.0.0-dev.0
> - groupfolders: 22.0.6
> - logreader: 7.0.0
> - lookup_server_connector: 1.22.0
> - nextcloud_announcements: 6.0.0
> - notes: 6.0.2
> - notifications: 7.0.0-dev.1
> - oauth2: 1.22.0
> - officeonline: 3.2.1
> - password_policy: 6.0.0-dev.0
> - photos: 7.0.0
> - privacy: 6.0.0-dev.1
> - profile: 1.3.0
> - provisioning_api: 1.24.0
> - recommendations: 7.0.0
> - serverinfo: 6.0.0
> - settings: 1.17.0
> - sharebymail: 1.24.0
> - suspicious_login: 12.0.0-dev.0
> - systemtags: 1.24.0
> - theming: 2.9.0
> - twofactor_backupcodes: 1.23.0
> - twofactor_nextcloud_notification: 8.0.0
> - twofactor_totp: 16.0.0
> - updatenotification: 1.24.0
> - uppush: 2.5.0
> - user_status: 1.14.0
> - viewer: 7.0.0-dev.0
> - webhook_listeners: 1.6.0
> - workflowengine: 2.16.0
> Disabled:
> - app_api: 34.0.0 (installed 32.0.0)
> - comments: 1.24.0 (installed 1.24.0)
> - federation: 1.24.0 (installed 1.24.0)
> - files_reminders: 1.7.0 (installed 1.7.0)
> - fulltextsearch: 34.0.1 (installed 34.0.1)
> - office: 1.0.0 (installed 1.0.0)
> - previewgenerator: 5.14.0 (installed 5.14.0)
> - related_resources: 5.0.0-dev.0 (installed 5.0.0-dev.0)
> - sentry: 8.20.0 (installed 8.20.0)
> - support: 6.0.0 (installed 6.0.0)
> - survey_client: 6.0.0-dev.0 (installed 6.0.0-dev.0)
> - tables: 2.3.0 (installed 2.3.0)
> - text: 8.0.0 (installed 8.0.0)
> - user_ldap: 1.25.0 (installed 1.22.0)
> - weather_status: 1.14.0 (installed 1.14.0)
```

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/5_5575768a8748004e209b776fc1b2916d.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [September 7, 2026, 11:49am UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/2 "2026-09-07T11:49:34Z")

</div>

On your admin settings in the basics, what does it say when the cronjob was run for the last time? It should normally be a couple of minutes. =\> Cronjob normally should check for rotation, if it does not run, it does not rotate.

When you know that it runs and it is not possible, it might leave a few traces in the logs. You can also check if the webserver user has permissions to change the file and rename a file in the folder. Is the nextcloud.log in your normal data-folder? Or in a different location? If you change the default location, this is defined in the `config/config.php` file

---

<div class="post-metadata">

**Author:** ![theking2](https://help.nextcloud.com/user_avatar/help.nextcloud.com/theking2/32/78496_2.png) [@theking2](https://help.nextcloud.com/u/theking2)\
**Post date:** [September 26, 2026, 8:24pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/3 "2026-09-26T20:24:21Z")

</div>

> [@tflidd](#):
>
> On your admin settings in the basics, what does it say when the cronjob was run for the last time?

is log rotation part of the standard cron? /cron.php is run every 3 min. Is there a log entry made I insert here?

 ![image](https://help.nextcloud.com/uploads/default/original/3X/0/0/002325e7417c995c0e944e8904b1d8497e572090.png)

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/5_5575768a8748004e209b776fc1b2916d.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [September 28, 2026, 8:45am UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/4 "2026-09-28T08:45:18Z")

</div>

> [@theking2](#):
>
> is log rotation part of the standard cron?

how else should nextcloud control it? You can use system services like logrotate to do that for you. I’m not sure if it checks on each run, or just when the heavy tasks are enabled in the night. It might fail if the webserver user does not have permissions to move/copy files in the folder where the nextcloud.log is located (by default the data folder, there it should not be a problem but it might be one if you put the logs in /var/logs/…)

Also the error in the cron, make sure the other cronjobs run, check out which one creates the error with the more than 1000 expressions (in case the ones after do not run). There is also a db-table (oc\_jobs, oc\_cron … not sure) where there is a list of cronjobs executed, it keeps a timestamp when it was run the last time, executions times, …

---

<div class="post-metadata">

**Author:** ![theking2](https://help.nextcloud.com/user_avatar/help.nextcloud.com/theking2/32/78496_2.png) [@theking2](https://help.nextcloud.com/u/theking2)\
**Post date:** [October 2, 2026, 9:05pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/5 "2026-10-02T21:05:38Z")

</div>

My logs are never rotated and grow in the GBytes size is why I’m asking

---

<div class="post-metadata">

**Author:** ![rakekniven](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rakekniven/32/67096_2.png) [@rakekniven](https://help.nextcloud.com/u/rakekniven)\
**Post date:** [October 2, 2026, 9:21pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/6 "2026-10-02T21:21:03Z")

</div>

Have you seen [Rotate logs manually (nextcloud.log audit.log)](https://help.nextcloud.com/t/rotate-logs-manually-nextcloud-log-audit-log/161457) ?

Which rotation mechanism do you use?

---

<div class="post-metadata">

**Author:** ![theking2](https://help.nextcloud.com/user_avatar/help.nextcloud.com/theking2/32/78496_2.png) [@theking2](https://help.nextcloud.com/u/theking2)\
**Post date:** [October 19, 2026, 11:22am UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/7 "2026-10-19T11:22:13Z")

</div>

I deleted the nextcloud.log file yesterday.

`-rw-r----- 1 www-data users 202605 Oct 19 13:12 /pool0/storage/nextcloud_data/nextcloud.log`

I now set the size to 128k with `occ log:file --rotate-size=128KB`

There seem to be no occ command to manually rotate the logfile, is there?

---

<div class="post-metadata">

**Author:** ![rakekniven](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rakekniven/32/67096_2.png) [@rakekniven](https://help.nextcloud.com/u/rakekniven)\
**Post date:** [October 20, 2026, 5:23pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/8 "2026-10-20T17:23:46Z")

</div>

> [@theking2](#):
>
> There seem to be no occ command to manually rotate the logfile, is there?

No, please see the official docs here:

> **[Logging — Nextcloud 35 Administration Manual](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html)**

> [@rakekniven](#):
>
> Which rotation mechanism do you use?

You did not answer my question.

Have you read the link I gave you?

On debian you can use logrotate to rotate your logs. Did you configure that?

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [October 20, 2026, 9:51pm UTC](https://help.nextcloud.com/t/log-rotate-size-ignored/248993/9 "2026-10-20T21:51:26Z")

</div>

The log file is checked against the configured maximum size at each job interval, independent of log writing. Currently that is every 60 minutes for the system rotate job.

I mention this in case it is rotating just not quickly enough for you.
