sipcapture / heplify-server

HEP Capture Server for HOMER
https://sipcapture.org
GNU Affero General Public License v3.0
186 stars 89 forks source link

Multiple instances cause rotator to get stuck #548

Closed ostap0207 closed 8 months ago

ostap0207 commented 8 months ago

We are running heplify-server in kubernetes and have 2 replicas for resiliancy.

When heplify DB rotator is run we get the following error in one pod, that does not stop and makes pod obsolete:

rotator.go:613: WARN pq: duplicate key value violates unique constraint "pg_class_relname_nsp_index"

This seems to happen as both pods have rotation enabled (as they use the same exact config) and the second rotation get stuck with the error above as it tried to create a table that already exists.

rnalrd commented 5 months ago

@ostap0207 how did you address this problem? Did you disable "DBRotate" on the RS, and run another RS with count = 1 with DBRotate "true"?

ostap0207 commented 5 months ago

This turned out not to be the actual problem, the pods eventually got unstuck themselves.