# Filebeat 8.7.1 : Logging Configurations logging.files.rotateeverybytes not working

**URL:** https://discuss.elastic.co/t/filebeat-8-7-1-logging-configurations-logging-files-rotateeverybytes-not-working/368890
**Category:** Beats
**Tags:** filebeat
**Created:** [October 16, 2024, 7:35am UTC](https://discuss.elastic.co/t/filebeat-8-7-1-logging-configurations-logging-files-rotateeverybytes-not-working/368890 "2024-10-16T07:35:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Nandhini\_Viswanathan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandhini_viswanathan/32/121085_2.png) [@Nandhini\_Viswanathan](https://discuss.elastic.co/u/Nandhini_Viswanathan)
#### Post date: [October 16, 2024, 7:35am UTC](https://discuss.elastic.co/t/filebeat-8-7-1-logging-configurations-logging-files-rotateeverybytes-not-working/368890/1 "2024-10-16T07:35:14Z")

</div>

Hello All,

I am trying to rotate the logs generated by filebeat process by setting maximum file size of 1MB by configuring logging.files.rotateeverybytes: 1048576 but logs files are getting generated more than 10 MB and rotation is not happening.  
Please find my filebeat logging configuration in my filebeat.yml as shown below:

```auto
logging:
  level: warning
  to_syslog: false
  to_files: true
  files:
    path: /var/log/filebeat
    name: filebeat.log
    keepfiles: 5
    rotateonstartup: false
    rotateeverybytes: 1048576

```

I have changed rotateonstartup as false hence i dont want filebeat process to create new log files for every startup. rotateeverybytes is not working as expected. Sometimes the above configuration works but inconsistently. Could you please help here.
