Skip to content
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

[docdb] Better log rotation #3604

Open
ddorian opened this issue Feb 10, 2020 · 6 comments
Open

[docdb] Better log rotation #3604

ddorian opened this issue Feb 10, 2020 · 6 comments
Assignees
Labels
area/docdb YugabyteDB core features good first issue This is a good issue to start contributing! help wanted We welcome your contributions for this issue! kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@ddorian
Copy link
Contributor

ddorian commented Feb 10, 2020

Jira Link: DB-2438
Hi

We need a better log rotation policy.
1 way is to keep static naming and allow another process to rotate: google/glog#19 (patch google/glog@58d7f87)

Another way would be to add an option glog_delete_after and a simple bg thread to enforce the policy. For now, having glog_delete_after=<size> should be a good start. It will take us a day or two to implement and probably save us devops trouble in different environments (k8s sidecar comes to mind).

@ddorian ddorian added the area/docdb YugabyteDB core features label Feb 10, 2020
@ddorian ddorian changed the title [docdb] Better logrotation [docdb] Better log rotation Feb 10, 2020
@bmatican bmatican added good first issue This is a good issue to start contributing! help wanted We welcome your contributions for this issue! labels Feb 10, 2020
@bmatican bmatican removed their assignment Feb 10, 2020
@bmatican
Copy link
Contributor

Opening this up for now, as the bg thread + size flag should not be too complicated.

@iSignal
Copy link
Contributor

iSignal commented Mar 19, 2020

We hit this recently in a customer scenario, where glogs took up 20G space over time. We need to be able to have the yb-tserver process automatically cap its logs when run in some of these scenarios where having a separate log prune script is overkill.

@ddorian
Copy link
Contributor Author

ddorian commented Mar 20, 2020

Example: I have a local installation that I've used for a long time. It had 85GB logs in 1 yb-tserver.

@tylarb
Copy link
Contributor

tylarb commented Feb 3, 2021

I like the idea of static naming followed by log rotation using an external tool - this allows easy transport of logs to syslog or other OS managed logging systems.

@tylarb
Copy link
Contributor

tylarb commented Jul 21, 2021

This feature could be relevant for k8s as well - where we let k8s control the logs size, rather than having a sidecare process / container that only does log rotation.

@kulminaator
Copy link

I'm also interested in seeing a more predictable log rotation scheme.

From the top of the hill that i sit on - the hourly or daily rotation scheme that postgres uses makes it very predictable how and where stuff is logged (and also allows easy instructions for external tooling how they can archive - ship - delete log files).

Current scheme where my ERROR log files hardly get any content they will never reach any rotation at all.

@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 9, 2022
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature and removed kind/bug This issue is a bug labels Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features good first issue This is a good issue to start contributing! help wanted We welcome your contributions for this issue! kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

8 participants