<p>Could it have something to do with "old-non-expired-non-removed" dialogs?</p>
<p>So today I applied latest <a class="user-mention" data-hovercard-user-id="3033729" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/charlesrchance">@charlesrchance</a> patch, and what I normally do (so I don't lose dialogs) is:</p>
<p>1- Restart one node<br>
2- Wait for DMQ replication dialog sync<br>
3- Restart other node</p>
<p>Right after restarting both nodes in that sequence, I already could see values close to ULONG_MAX, so I did a <code>watch</code> every second and I could see the values move around.</p>
<p>I decided to compare the dialogs to see if I could find anything interesting, what I found is that there were a lot of dialogs with the <code>init_ts</code> from like 11th and 13th July and being today 28th, those dialogs should not be there.</p>
<p>So I wonder if those "bad" dialogs could be the cause of the counters going below 0.</p>
<p>Maybe some timer to remove those dialogs didn't happen? and because of the way I perform restarts to not lose dialogs, they were constantly there replicated backwards and forwards...</p>
<p>That said, I did a full restart (both nodes at the same time, losing dialogs) and since then the metrics are looking good.</p>
<p>I hope this info helps.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1591#issuecomment-408629258">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZXWpNQpPPTCaL_w1jyqBwHXPdIyVks5uLLhHgaJpZM4VLmd9">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZQ3gYNBnnIoroTmfD3FHNANR-m0sks5uLLhHgaJpZM4VLmd9.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@joelsdc in #1591: Could it have something to do with \"old-non-expired-non-removed\" dialogs?\r\n\r\nSo today I applied latest @charlesrchance patch, and what I normally do (so I don't lose dialogs) is:\r\n\r\n1- Restart one node\r\n2- Wait for DMQ replication dialog sync\r\n3- Restart other node\r\n\r\nRight after restarting both nodes in that sequence, I already could see values close to ULONG_MAX, so I did a `watch` every second and I could see the values move around.\r\n\r\nI decided to compare the dialogs to see if I could find anything interesting, what I found is that there were a lot of dialogs with the `init_ts` from like 11th and 13th July and being today 28th, those dialogs should not be there.\r\n\r\nSo I wonder if those \"bad\" dialogs could be the cause of the counters going below 0.\r\n\r\nMaybe some timer to remove those dialogs didn't happen? and because of the way I perform restarts to not lose dialogs, they were constantly there replicated backwards and forwards...\r\n\r\nThat said, I did a full restart (both nodes at the same time, losing dialogs) and since then the metrics are looking good.\r\n\r\nI hope this info helps."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1591#issuecomment-408629258"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1591#issuecomment-408629258",
"url": "https://github.com/kamailio/kamailio/issues/1591#issuecomment-408629258",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [kamailio/kamailio] RPC command stats.get_statistics randomly reporting 9223372036854776000 for current active/early dialogs (#1591)",
"sections": [
{
"text": "",
"activityTitle": "**Joel Serrano**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@joelsdc",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1591,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1591\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1591#issuecomment-408629258"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 355362685\n}"
}
],
"themeColor": "26292E"
}
]</script>