- Newest
- Most votes
- Most comments
To address the issue of your Elastic Beanstalk environment's server disk getting full due to the cfn-wire.log file, there are several approaches you can take:
-
Log Rotation: You can configure log rotation for the cfn-wire.log file. This will automatically compress and archive old log files, preventing a single file from growing too large.
-
Stream Logs to CloudWatch: Elastic Beanstalk provides the ability to stream instance logs to Amazon CloudWatch Logs. This can help manage log storage on the instance itself.
To enable log streaming to CloudWatch Logs:
- Open the Elastic Beanstalk console and select your environment.
- In the navigation pane, choose "Configuration".
- Under "Updates, monitoring, and logging" configuration category, select "Edit".
- In the "Instance log streaming to CloudWatch Logs" section, set "Log streaming" to "Enabled".
- Configure the retention period and lifecycle settings as needed.
- Apply the changes.
This will stream various logs, including system logs, to CloudWatch Logs. While cfn-wire.log isn't explicitly mentioned in the default log streams, you may be able to add it to the list of logs being streamed.
-
Custom Log Configuration: You can create a custom configuration file in the .ebextensions directory of your application source to manage specific log files like cfn-wire.log. This could include setting up log rotation or redirecting the log to CloudWatch Logs.
-
Increase Storage: If the logs are necessary and you can't reduce their size, consider increasing the storage capacity of your Elastic Beanstalk instances.
-
Review CloudFormation Usage: Although you mentioned not explicitly using CloudFormation, Elastic Beanstalk often uses CloudFormation behind the scenes to provision resources. You may want to review your Elastic Beanstalk configuration to see if there are any unnecessary resources or processes that could be generating these logs.
Remember to test any changes in a non-production environment first to ensure they don't negatively impact your application's performance or functionality.
Sources
Viewing your Elastic Beanstalk environment logs - AWS Elastic Beanstalk
Using Elastic Beanstalk with Amazon CloudWatch Logs - AWS Elastic Beanstalk
eb logs - AWS Elastic Beanstalk
answered 2 years ago
Thanks for this information. I have CloudWatch logging turned on already. I understand I can configure custom log configurations using .ebextensions, but rather than incurring cost/complexity for this particular log file I'd like to disable it at source in cloudformation. If you have any recommendations for how to do that I'd appreciate it.
Relevant content
asked 4 years ago

I still need a solution - even trying to fix it with logrotate, it seems like its already rotating. But I can't find the configuration file defining the rotation settings for this file. And I can't find anywhere how to stop or slow down the keep-alive messages, or set the logging level to something less verbose.