Hi,

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.

Thanks!

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.

×
2 answers

Hi,

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

thanks so much for your help @eleu

Submit an Answer