Hi List
I noticed that the database is accumulating entries on dialog_vars.
I don't know when and why this is happening.
Are there any special measures that have to be taken like making sure to unset variables after using them to prevent this?
Or is this something which is supposed to happen when kamailio is restarted?
Mit freundlichen Grüssen
-Benoît Panizzon-
Hello,
does it happens during run-time, or maybe after a few restarts of the server? Normally they should be removed if the dialog ended or expired.
Cheers,
Henning
Hi Henning
does it happens during run-time, or maybe after a few restarts of the server? Normally they should be removed if the dialog ended or expired.
Thank you.
I have to observe this more closely. As active development is performed, restarts are performed frequently, even while calls-tests are running.
I just wanted to make sure there is not need to specifically clear dialog variables at the end of a dialogue.
Hi Henning
So I tested. Yesterday I send traffic, around 400 concurrent dialogues over the two DMQ synced instances and stopped the traffic in the evening waiting until today to make sure all calls have ended.
None of the two instances was restarted during that testing.
I have not seen memory related error messages in the logs. So I guess SHM=1024 is large enough now.
This morning:
# kamcmd dlg.stats_active { starting: 0 connecting: 0 answering: 0 ongoing: 0 all: 0 }
So no more running calls on any of the two instances.
But when I look in the local mysql database used to store dialogues:
Instance 2:
mysql> select count(*) from dialog; select count(*) from dialog_vars; +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec)
+----------+ | count(*) | +----------+ | 271 | +----------+ 1 row in set (0.00 sec)
Instance 1:
mysql> select count(*) from dialog; select count(*) from dialog_vars; +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec)
+----------+ | count(*) | +----------+ | 472 | +----------+ 1 row in set (0.00 sec)
So still, quite some variables left in dialog_vars and not the same count. What could be cause this issue?
Mit freundlichen Grüssen
-Benoît Panizzon-
Hmm, I have a suspicion how this happens...
I could more or less reproduce the issue:
2 Kamailio instances, synced with DMQ. Both store dialog_vars in a local database for performance.
While a dialog is ongoing, stop instance 2. This instance 2 probably has stored dialog information in it's local database.
End the dialog. Instance 1 propperly removes dialog_vars from it's local database and forgets about it.
Restart Instance 2.
No longer existing dialog data from instance 2 is getting DMQ synced to Instance 1. This dialog is sticking around on both instances and never expiring.
Mit freundlichen Grüssen
-Benoît Panizzon-
Hello,
thanks for the additional information. It should certainly expire the dialog after some time, even if it's synchronized from DMQ to the first instance.
Maybe you can try it with a small dialog timeout variable in a test setup, if possible. If its not expiring, an issue could be opened about it.
Cheers,
Henning