-
Notifications
You must be signed in to change notification settings - Fork 86
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
Postgresql database size #89
Comments
I checked the helplify-server environment variables and rotation should be enable with the HEPLIFYSERVER_DBROTATE and HEPLIFYSERVER_DBDROPDAYS variables:
So I'm not sure why/how the postgresql database has got so large. |
I managed to clear enough storage space to be able to restart the docker services, get it running, and now able to login. However, how do I now manually delete the old entries?! |
We have reports of the ENV variables not working indeed. The immediate solution is map your own heplify configuration file to the container and specify the values there while we investigate this. |
Hi. Thanks for your response! I'm new to docker so please could you provide further details on how exactly to do that. Also, I'm able to access the 'db' docker image now and can use psql to manage the postgres database. I see that the 'homer_data' database has many tables in it - I assume this is whether the SIP captures are kept. Is it just a case of dropping these tables to delete the data, or would that break anything that is referencing them? Thank you! |
Could you provide the output of |
Hi. Not sure whether you need all of it, but this is the end of the logs. There are lots of ERR entries for rotator.go. 2020/09/29 08:58:57.367745 rotator.go:94: ERR dial tcp: lookup db on 127.0.0.11:53: server misbehaving Please let me know if there is anything else that is needed. Thank you. |
The settings seems to propagate correctly. Could you confirm you have data older than 5 days in the DB? |
To be honest, I'm not sure how check for the data, since this particular system does not get any/much SIP traffic - this why it is worrying that storage space has been heavily used by the postgresql database. I can see that homer_data database contains lost of tables, with the date stamps in their names that are older than 5 days - i.e. from 17th September. I haven't tried to check the size and contents of the tables yet. There are 607 rows. For example: List of relations What does the different hep_prot_x values means? |
Our root partition is 16G in size and the homer_data database is 11G in size: homer_data=# SELECT I've checked the storage again and it has got full again - after I cleared up only several hundred megs of storage to get it accessible again. This on a setup with hardly any SIP traffic running through it at the moment. |
Please advise whether I can just delete the tables in the homer_data database. |
Sure, that's what the rotation does as well. Did you see any suspect logs on the postgres node? |
I can't use psql now - since there is no more storage... :'( |
I suppose the container maps to a local folder? If so - You should be able to drop data manually and restart to regain control |
I managed to clear some storage - deleted the old kernels - and got access with psql again. I deleted the tables: hep_proto_1_default_20200917* Do I need to delete any other related/correspond tables? I.e. any other hep_proto_x tables on those dates? This has given me 2G of storage so I should be OK for a while. |
Hi, I checked the server this morning and it seems something has happened and I now have 8.3G of free space. However, looking at the heplify-server logs, I see the following such messages: 2020/09/30 03:44:22.532031 postgres.go:291: ERR pq: Could not complete operation in a failed transaction Checking the docker processes, I see that alertmanager and prometheus were in 'Restarting' state, and restarting them doesn't change the status. Whether this is related to the above log messages, I don't know. Please advise what those log ERR and WARN messages mean and how to resolve them. Thank you. |
Looking at the contents of the homer_data tables, it seems most of it is filled with SIP OPTIONS. However, this traffic is not visible in the Homer web app. I will look in to how to stop SIP OPTIONS from being sent from the HEP source to reduce the storage requirements. But how can I make SIP OPTIONS visible in the Homer web app? Having visibility of SIP OPTIONS can be useful in certain situations. |
SIP Options are of course visible, just in their own transaction. This has
been the case since Homer 5 - use the form transaction type.
|
Do you mean in the Search form/widget in the Homer web app GUI? I don't see a 'Transaction Type' search field to add to it. Only 'Proto Family', 'Protocol Type', 'Payload Type'. But even with all the search fields empty - so everything should be included? - it does not show SIP OPTIONS in the Display Results. Am I looking in the wrong place? |
In the 'SIP Method' search field - only the following methods appears in the drop down menu: INVITE Even if I type in 'OPTIONS' manually in to it, it does not show any search results. |
HOMER splits messages by transaction type (call, registration, everything else) in different buckets to allow rotating them at different speeds - Most likely you are searching for out-of-band messages. Try using the Please confirm if this is your case so we can improve documentation - its all pretty fresh. |
Ah, thank you! I now see where the 'Proto' field is in the search Settings window. It is currently on 'SIP - call' and I have now changed it to 'SIP - default' and the search SIP Methods and results now include SIP OPTIONS. I was not aware that this 'Proto' option and that it limits what the results return. I now read it as for the 'SIP Method' search field, if nothing is selected then it will match all methods in that list, which can be different based on what is selected in the search Settings for 'Proto'. |
HEPLIFYSERVER_DBROTATE=true DB rotation works fine using above ENVs, recently tested with (heplify-server version 1.59.6) |
Hi,
I'm having problems my dockered Homer 7 setup. It was working and now I am not able to login. Initially login was saying the password is wrong, now I'm getting a '502 Bad Gateway'.
The docker 'sipcapture/webapp' docker imaga seems to be in a 'Restarting' state after trying to restart it, or reboot the VM it is on.
I then noticed that there was no space left on root and the following directory was taking up most of the storage space:
/usr/local/src/homer7-docker/heplify-server/hom7-prom-all/postgres-data/base/24576
I assume this where the SIP captures are actually stored omn the postgresql database.
How do I clean this up to make more space, without being able to login to the Homer GUI? Is there a way to truncate or dropthe SIP captures after a certain date?
Thank you.
The text was updated successfully, but these errors were encountered: