Openlitespeed Log Rolling Size


Almost every 2 days my logs are max out my disk space, over 50G, the logs are under /usr/local/lsws/logs

How can I limit the log size inside Openlitespeed?

I tried the console, the the log limit/rotation options are only for error.log. Not logs in that path.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer


Just want to share the findings and solution here.

Error message found: Too many error message(Accept failed:Too many open files!) can be fixed by increasing the Server Configuration -> Tuning -> Max Connections & Max SSL Connections to higher number, e.g. 10000…

Default error log rotate is 30 days. So in general you won’t get disk full issue due to too many error logs.

The rolling function: When the log size over 10M, it will create a new log file and keep logging it. The 10M log will be archived and will be deleted after default 30 days.

To prevent log fill up the disk, you can try method:

  1. Insert keepDays 1 to /usr/local/lsws/conf/httpd_config.conf errorlog logs/error.log section. In this way, the error log will only store for one day
  2. Use cron job to auto remove error.log.*. In this way, all archived log will be removed.

I will discuss with our developer see if we can provide some option on GUI(web admin) or something else to avoid the issue in the future.

Best, Eric

I ran into the same issue and changed the error log level to “error”. It was very verbose.

thanks so much for your help @eleu

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel