AMP-SCZ / dpdash

Deep phenotyping dashboard
Other
2 stars 1 forks source link

Limit MongoDB logs #501

Open tashrifbillah opened 7 months ago

tashrifbillah commented 7 months ago

Size of /opt/dpdash/dpstate/dpdash/mongodb/logs/mongod.log was growing over 7 GB. As a result, VM was getting full and DPdash was stalling. Two solutions we are eyeing for this are:

1. https://github.com/AMP-SCZ/dpdash/blob/962c3e5c1dcb8ed89c2d671f47fe008eab8e362b/singularity/configure.py#L230 Remove --logpath , it is ineffectual as there is logPath definition already:

https://github.com/AMP-SCZ/dpdash/blob/962c3e5c1dcb8ed89c2d671f47fe008eab8e362b/singularity/configure.py#L119

Use --quiet flag with mongod launch command.

2. https://github.com/AMP-SCZ/dpdash/blob/962c3e5c1dcb8ed89c2d671f47fe008eab8e362b/singularity/configure.py#L120

Use logRotate: reopen after this line. Although after what file size log will be rotated is unclear, we want to use it as a an added safety.

tashrifbillah commented 7 months ago

Commit the changes to this branch: https://github.com/AMP-SCZ/dpdash/tree/patch-v1.2.0

We shall deploy these changes to rc-predict after first week of December's patching.