-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad server.log rotation reaches filename length limits (since 365) #10394
Comments
cc @bitweld |
@guyco33 could You provide your log.properties content |
log.properties
|
The new logger only rolls on size. If we want to roll on some other condition, it wouldn't be too difficult to add: https://github.com/airlift/airlift/blob/729cc2fd95212d87c0343ecb1099914a2870d371/log-manager/src/main/java/io/airlift/log/RollingFileMessageOutput.java#L237-L239 |
For some reason each rotation creates a new sym link (instead of a new archived file) while the actual file name is appended with a new suffix:
|
That's intentional. This makes the files append-only, which are easier to handle for software that tails files.
That seems like a bug. The prefix should remain constant and the suffix should change for every new file (but not appended to the existing name). cc @dain |
Ya that is definitely a bug |
Here is the Airlift PR airlift/airlift#971 |
Didn't we have date-based rolling? |
The issue referenced here is affecting our production. Once the log file names reach a certain length, CentOS is not allowing to create fresh ones and so Trino service won't start. Example server.log file that is generated (this one hasn't reached the max length yet) server.log-20211201.010845-20211201.012339-20211201.012440-20211201.013539-20211201.013752-20211201.014907-20211210.232940-20211211.043859-20211221.190243-20211221.205350-20220104.134506 Current fix is to delete the log files and restart the service. Looking forward to see the airlift patch merged and get it added to the upcoming release. |
Which milestone is this closed in? |
BTW, there is a kill switch for the new logging code: log.legacy-implementation.enabled |
I write more tests and could not reproduce this behavior. Also, ran the dev server with config.properties:
and it worked as expected:
|
In my installation logs are created in Trying to set
|
The bug is in the launcher python script in airlift: airlift/airlift#978 |
Approve that airlift/airlift#978 fixes the issue. Thanks @dain |
Issue will be closed after Bumping Trino with a new airlift version |
airlift/airlift#971 , airlift/airlift#978, airlift/airlift#980, airlift/airlift#974 ... |
The
server.log
file has stopped rotating correctly(daily gzip backup files) since365
.It seems to be related to the recent airlift upgrade 200ec0e
airlift/airlift@c5adbd8
airlift/airlift@9e5ba2b
364
365+
The text was updated successfully, but these errors were encountered: