error_log massive size

GR_

Verified User
Joined
Nov 13, 2008
Messages
27
I've a CentOS 8 with DA 2.0.0 (rev: 2652), OpenLiteSpeed /1.7.7

After 2020 December I struggle with permanent problem with /var/log/httpd/error_log

Time to time the error_log file exceeds 80-100 GB,

The error_log file contains records such as:

2021-01-10 13:14:38.981444 [WARN] engine: error sending packet for mini...
2021-01-10 13:21:43.455051 [WARN] engine: error sending packet for mini..
2021-01-10 13:39:12.657810 [WARN] [QUIC:...] conn: Abort connection: non-MTU probe 1252-byte packet 52 is too large
2021-01-10 22:20:33.360410 [DEBUG] engine: next advisory tick is now: have pending PRQ elements
2021-01-10 22:20:33.360412 [DEBUG] engine: next advisory tick is now: have pending PRQ elements
2021-01-10 22:20:33.360417 [DEBUG] [UDP:...] onRead: available packet buffers: 87
2021-01-10 22:20:33.360422 [DEBUG] [UDP:...] readOnePacket: read in packet for CID B1851E006F61621E, size: 119
2021-01-10 22:20:33.360425 [DEBUG] [UDP:...] onRead: read 1 packet
...
2021-01-14 00:14:55.385953 [WARN] [QUIC:...DA] mini-conn: Received CONNECTION_CLOSE frame (code: 34; reason: Certificate data invalid)
2021-01-14 00:14:55.385976 [WARN] mini-conn: enc hist Ibj; User-Agent: Chrome/87.0.4280.141 Android 7.0; HUAWEI VNS-L21
2021-01-14 10:40:16.105786 [WARN] [QUIC:...] mini-conn: Received CONNECTION_CLOSE frame (code: 34; reason: Certificate data invalid)
2021-01-14 10:40:16.178416 [WARN] [QUIC:...] mini-conn: Received CONNECTION_CLOSE frame (code: 34; reason: Certificate data invalid)
2021-01-14 11:13:21.705300 [DEBUG] [QUIC:...] event: decrypted packet 86
2021-01-14 11:13:21.705303 [DEBUG] [QUIC:...] event: packet in: 86, type: Short, size: 33; ecn: 0, spin: 0; path: 0
2021-01-14 11:13:21.705306 [DEBUG] [QUIC:...] event: ACK frame in: [82-74]
...
2021-01-15 00:15:58.750914 [DEBUG] engine: dropping inbound packet for unknown connection (cooldown)
2021-01-15 00:15:59.369891 [DEBUG] eng-hist: 00:15:59: pi: 1; po: 0; +mc: 0; -mc: 0; +fc: 0; -fc: 0
2021-01-15 00:15:59.369914 [DEBUG] engine: dropping inbound packet for unknown connection (cooldown)
2021-01-15 00:15:59.618418 [DEBUG] engine: dropping inbound packet for unknown connection (cooldown)
2021-01-15 00:16:01.095758 [NOTICE] [Child: 4285] Shut down successfully!
2021-01-15 00:16:01.095778 [NOTICE] HttpServerImpl::releaseAll called, pid 4285,

As I assume the service logs warnings and debugs despite that in file

/usr/local/lsws/conf/httpd-logs.conf

is written:

errorlog /var/log/httpd/error_log {
logLevel ERROR
rollingSize 0
enableStderrLog 1
}

Thus, the I have permanent storage overflows and have to manually delete the log file.

Could someone help me with this and advise how to solve the problem?
 
Last edited:
Don't edit the /usr/local/lsws/conf/httpd-logs.conf file directly. You will need to create a custom httpd-logs.conf using the following commands.

Code:
cd /usr/local/directadmin/custombuild/
cp -p configure/openlitespeed/conf/httpd-logs.conf custom/openlitespeed/conf/
nano /usr/local/directadmin/custombuild/custom/openlitespeed/conf/httpd-logs.conf

Now edit the file and change the settings you want, for example, you can change logLevel to ERROR/INFO/DEBUG and then set rollingSize to your desired log size. You can also add in the keepDays option if you want. So the completed httpd-logs.conf file would look something like this.

Code:
errorlog /var/log/httpd/error_log {
        logLevel             ERROR/INFO/DEBUG
        debugLevel           0
        rollingSize          25M       
        enableStderrLog      1
        keepDays             7
}

After you have done that you will need to rewrite the config files using ./build rewrite_confs. This will copy your custom httpd-logs.conf file into the main one located in the /usr/local/lsws/conf/ folder.
 
  • Like
Reactions: GR_
Dear LeonDynamic

Firstly, thank you for your such detailed explanations,

but I want to clarify several aspects:

1. I've not touched the /usr/local/lsws/conf/httpd-logs.conf file, it is in it own original version
2. I'm pretty happy with the setting: logLevel ERROR

But the problem is that, in the error_log file is logged everythng, including WARN, DEBUG, etc. which makes the log file horribly huge.

That is what I want to disallow - logging everything except the ERRORs.
 
No problem at all. The issue is because of the way OLS logs errors. You have 5 options ERROR, WARNING, NOTICE, INFO and DEBUG with ERROR being high and INFO being low. Basically when set to ERROR it will log everything from all 5 options which will cause the log to grow significantly as you are seeing. If you set it to INFO it won’t log anything above that option.

That is what I want to disallow - logging everything except the ERRORs.

You will need to change logLevel to WARNING. This way it will log everything except the ERRORS.
 
  • Like
Reactions: GR_
Maybe check here:


You might post here as well https://www.litespeedtech.com/support/forum/
 
Back
Top