Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Cleanup Logs #4826

Closed
vokary opened this issue Jan 3, 2016 · 1 comment
Closed

Cleanup Logs #4826

vokary opened this issue Jan 3, 2016 · 1 comment

Comments

@vokary
Copy link

vokary commented Jan 3, 2016

Hello,

I am currently running Deis v1.10.1 and the folder /var/lib/deis/store/logs contains about 100gb log data. Clearing one of the logfiles > app1.log will wipe the data from the file -> 0kb but when running deis logs -a app1 I get the following error.

panic: runtime error: index out of range
goroutine 1 [running]:
github.com/deis/deis/client/cmd.AppLogs(0x7ffd346fbe73, 0x13, 0xffffffffffffffff, 0x0, 0x0)
/home/jenkins/workspace/build-deis-cli-installer-linux/src/github.com/deis/deis/client/cmd/apps.go:162 +0x571
github.com/deis/deis/client/parser.appLogs(0xc82000a1d0, 0x3, 0x3, 0x0, 0x0)
/home/jenkins/workspace/build-deis-cli-installer-linux/src/github.com/deis/deis/client/parser/apps.go:192 +0x2b6
github.com/deis/deis/client/parser.Apps(0xc82000a1d0, 0x3, 0x3, 0x0, 0x0)
/home/jenkins/workspace/build-deis-cli-installer-linux/src/github.com/deis/deis/client/parser/apps.go:37 +0x3e9
main.Command(0xc82000a1d0, 0x3, 0x3, 0x585820)
/home/jenkins/workspace/build-deis-cli-installer-linux/src/github.com/deis/deis/client/deis.go:87 +0xc24
main.main()
/home/jenkins/workspace/build-deis-cli-installer-linux/src/github.com/deis/deis/client/deis.go:18 +0x60

What is the safe way to cleanup this folder? My Problem is the our Deis cluster is running on DO and almost running out of diskspace

EDIT:
after scale web=0 and web=1 for app1 i can see some logs again, so is this the only way to get rid of big log files?

@krancour
Copy link
Contributor

krancour commented Jan 4, 2016

For a while, we toyed with the idea of adding a logrotate cron job or something of the sort to the logger.

Ultimately, we have decided against that and headed in a direction instead where Deis stores logs short term in-memory. If you want to keep your logs, you drain them to someplace else.

See #4280 for further details.

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

No branches or pull requests

3 participants