-
Notifications
You must be signed in to change notification settings - Fork 36
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
High Disk usage without any messages queued #852
Comments
We experience this behavior on our PROD system. Maybe file descriptors are being leaked? We keep an eye on this issue and will be injecting |
Thanks for the extra information @fkollmann 👍 Sorry for not updating earlier, but we're aware of what's causing the issue, but we haven't been able to create a good solution to the problem yet. Sending multiple USR2 signals in succession ( |
Thanks for the feedback! This fits that we see more open files than actual existing files in the file system: kubectl exec lavinmq-2 --namespace uplift -c lavinmq -- sh -c 'find /var/lib/lavinmq/42099b4af021e53fd8fd4e056c2568d7c2e3ffa8 -type f | wc -l'
--> 293
kubectl exec lavinmq-2 --namespace uplift -c lavinmq -- sh -c 'lsof +D /var/lib/lavinmq/42099b4af021e53fd8fd4e056c2568d7c2e3ffa8 | wc -l'
--> 352 The workaround indeed does help. Running it once freed the disk space: kubectl exec lavinmq-2 --namespace uplift -c lavinmq -- pkill -USR2 lavinmq Thank you very much for this! We will add a container which runs this on a regular basis. |
The workaround works fine for us: This is what we did: In the k8s manifest, we added a container which sends the USR2 signal to the LavinMQ process: spec:
shareProcessNamespace: true # required to allow sending signal from 'garbage-collect' to 'lavinmq'
containers:
- name: lavinmq
....
- name: garbage-collect
....
command: [ "/usr/local/bin/sp_garbage_collect.sh" ] We use the following script to send the signal: #!/bin/sh
# This script manually triggers the garbage collection of LavinMQ.
#
# There currently is a bug which prevents LavinMQ to actually free disk
# space, because the garbage is not correctly triggered.
#
# For more details, see https://github.com/cloudamqp/lavinmq/issues/852
echo "Starting garbage collection every 100 minutes..."
while true
do
sleep 100m
echo "Triggering garbage collection..."
pkill -USR2 lavinmq
done Hope this helpy anyone else who has this issue. |
This should be fixed with the release of LavinMQ v2.1.0. Please upgrade to that and let us know if any problems remain! |
That's great, thanks for verifying! |
Describe the bug
After running LavinMQ for a while, the disk fills up even if there are no messages left in any queues.
du
reports usage, butdf
does not show it, pointing towards memory mapped files being deleted but not unmapped.Describe your setup
How to reproduce
Not sure yet.
Expected behavior
LavinMQ should not use any significant disk space if there are no messages queued.
The text was updated successfully, but these errors were encountered: