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

CouchDB dies if log directory is full #5283

Open
Sliosh opened this issue Oct 7, 2024 · 3 comments
Open

CouchDB dies if log directory is full #5283

Sliosh opened this issue Oct 7, 2024 · 3 comments

Comments

@Sliosh
Copy link
Contributor

Sliosh commented Oct 7, 2024

CouchDB dies and systemd tries to restart it over and over, if the log directory for file based logging is full.

Steps to Reproduce

Fill the disk (for example with fallocate) where the CouchDB log is written to and watch CouchDB go down.

Expected Behaviour

I expect, that CouchDB just stops logging and still works. The CouchDB data directory is on a separate disk and still has plenty of space to work with.

Your Environment

Debian 12 with the official CouchDB 3.3.3 package.

@nickva
Copy link
Contributor

nickva commented Oct 10, 2024

Good idea to stop writting and perhaps bump a metric.

Another way to handle it might be to use rsyslog or log to journald vs just a plain file.

We switched to using journald for RPM-based distros in 3.4.0, for instance.

@mikkimichaelis
Copy link

mikkimichaelis commented Oct 19, 2024

The very first thing I learned when administering a unix-like was to never let a fs fill. Bad things happen! Pretty straight forward stuff.

Is not the solution here proper log management?

@nickva
Copy link
Contributor

nickva commented Oct 23, 2024

@mikkimichaelis good point. But I think CouchDB's simple file logger is just that - a basic logger. I think it would be good to enhance it to stop writing when the disk is full, however I don't know if it will gain proper file rotation, it's own remote logging, or other such features.

In production it might be better to use a proper logger like rsyslog or journald [1]. CouchDB can be configured to use those easily:

[1] https://docs.couchdb.org/en/stable/config/logging.html#log/syslog_host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants