Skip to content

Log rotation #273

@thedotedge

Description

@thedotedge

Hi,
It would be great to have logrotate preconfigured, since /var/lib/ghost/content/logs folder is ever-growing. That cause issues when deploying to k8s, since pod would eventually crash:

[ghost-56f4c644f9-gps8f ghost]  [2021-11-24 15:46:52] �[36mINFO�[39m Ghost server started in 0.512s
[ghost-56f4c644f9-gps8f ghost]  events.js:377
[ghost-56f4c644f9-gps8f ghost]        throw er; // Unhandled 'error' event
[ghost-56f4c644f9-gps8f ghost]        ^
[ghost-56f4c644f9-gps8f ghost]  
[ghost-56f4c644f9-gps8f ghost]  Error: ENOSPC: no space left on device, write
[ghost-56f4c644f9-gps8f ghost]  Emitted 'error' event on Logger instance at:
[ghost-56f4c644f9-gps8f ghost]      at WriteStream.onStreamError (/var/lib/ghost/versions/4.20.3/node_modules/bunyan/lib/bunyan.js:627:18)
[ghost-56f4c644f9-gps8f ghost]      at WriteStream.emit (events.js:400:28)
[ghost-56f4c644f9-gps8f ghost]      at emitErrorNT (internal/streams/destroy.js:106:8)
[ghost-56f4c644f9-gps8f ghost]      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
[ghost-56f4c644f9-gps8f ghost]      at processTicksAndRejections (internal/process/task_queues.js:82:21) {
[ghost-56f4c644f9-gps8f ghost]    errno: -28,
[ghost-56f4c644f9-gps8f ghost]    code: 'ENOSPC',
[ghost-56f4c644f9-gps8f ghost]    syscall: 'write'
[ghost-56f4c644f9-gps8f ghost]  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions