<p>Compare the output from the same exact running opensips server:</p>

<p>PARTITION:: default<br>
    SET:: 1009<br>
        URI:: sip:216.X.X.141 state=Active<br>
        URI:: sip:216.X.X.142 state=Active<br>
        URI:: sip:216.X.X.146 state=Active<br>
        URI:: sip:216.X.X.147 state=Active<br>
        URI:: sip:216.X.X.148 state=Inactive<br>
        URI:: sip:216.X.X.149 state=Inactive<br>
        URI:: sip:216.X.X.171 state=Active<br>
        URI:: sip:216.X.X.172 state=Active<br>
        URI:: sip:216.X.X.173 state=Active<br>
        URI:: sip:216.X.X.174 state=Active<br>
        URI:: sip:216.X.X.175 state=Active<br>
        URI:: sip:216.X.X.176 state=Inactive<br>
    SET:: 2022<br>
        URI:: sip:216.X.X.164 state=Active<br>
    SET:: 1007<br>
        URI:: sip:216.X.X.139 state=Active<br>
        URI:: sip:216.X.X.141 state=Inactive<br>
        URI:: sip:216.X.X.142 state=Inactive<br>
        URI:: sip:216.X.X.146 state=Inactive<br>
        URI:: sip:216.X.X.147 state=Inactive<br>
        URI:: sip:216.X.X.170 state=Inactive<br>
        URI:: sip:216.X.X.171 state=Inactive<br>
        URI:: sip:216.X.X.172 state=Inactive<br>
        URI:: sip:216.X.X.173 state=Inactive<br>
        URI:: sip:216.X.X.174 state=Inactive<br>
        URI:: sip:216.X.X.175 state=Inactive<br>
        URI:: sip:216.X.X.177:5070 state=Active<br>
    SET:: 2018<br>
        URI:: sip:216.X.X.139 state=Active<br>
    SET:: 2017<br>
        URI:: sip:216.X.X.170 state=Active<br>
    SET:: 2015<br>
        URI:: sip:216.X.X.176 state=Active<br>
            attr:: 1000<br>
    SET:: 2014<br>
        URI:: sip:216.X.X.166 state=Active<br>
    SET:: 2013<br>
        URI:: sip:216.X.X.165 state=Active<br>
    SET:: 2010<br>
        URI:: sip:216.X.X.175 state=Active<br>
    SET:: 2009<br>
        URI:: sip:216.X.X.174 state=Inactive<br>
    SET:: 2008<br>
        URI:: sip:216.X.X.173 state=Active<br>
    SET:: 2007<br>
        URI:: sip:216.X.X.172 state=Active<br>
            attr:: 1000<br>
    SET:: 2006<br>
        URI:: sip:216.X.X.171 state=Active<br>
    SET:: 2005<br>
        URI:: sip:216.X.X.149 state=Active<br>
    SET:: 2004<br>
        URI:: sip:216.X.X.148 state=Active<br>
    SET:: 2003<br>
        URI:: sip:216.X.X.147 state=Active<br>
    SET:: 2002<br>
        URI:: sip:216.X.X.146 state=Active<br>
    SET:: 2001<br>
        URI:: sip:216.X.X.142 state=Active<br>
    SET:: 2000<br>
        URI:: sip:216.X.X.141 state=Active<br>
    SET:: 1001<br>
        URI:: sip:216.X.X.148 state=Active<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.149 state=Active<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.146 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.139 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.141 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.142 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.147 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.170 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.171 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.172 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.173 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.174 state=Inactive<br>
            attr:: 1000<br>
        URI:: sip:216.X.X.175 state=Inactive<br>
            attr:: 1000<br>
    SET:: 1000<br>
        URI:: sip:216.X.X.141 state=Active<br>
        URI:: sip:216.X.X.142 state=Active<br>
        URI:: sip:216.X.X.146 state=Active<br>
        URI:: sip:216.X.X.147 state=Active<br>
        URI:: sip:216.X.X.148 state=Inactive<br>
        URI:: sip:216.X.X.149 state=Inactive<br>
        URI:: sip:216.X.X.171 state=Active<br>
        URI:: sip:216.X.X.172 state=Active<br>
        URI:: sip:216.X.X.173 state=Active<br>
        URI:: sip:216.X.X.174 state=Active<br>
        URI:: sip:216.X.X.175 state=Active<br>
        URI:: sip:216.X.X.176 state=Inactive<br>
        URI:: sip:216.X.X.170 state=Active<br>
        URI:: sip:216.X.X.139 state=Active</p>

<p>ql&gt; SELECT * FROM dispatcher WHERE setid=1001 ORDER BY state;<br>
+-----+-------+--------------------+--------+-------+--------+----------+-------+--------------+<br>
| id  | setid | destination        | socket | state | weight | priority |<br>
attrs | description  |<br>
+-----+-------+--------------------+--------+-------+--------+----------+-------+--------------+<br>
| 227 |  1001 | sip:216.X.X.148 | NULL   |     0 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 319 |  1001 | sip:216.X.X.170 | NULL   |     0 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 324 |  1001 | sip:216.X.X.175 | NULL   |     0 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 315 |  1001 | sip:216.X.X.139 | NULL   |     0 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 228 |  1001 | sip:216.X.X.149 | NULL   |     0 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 316 |  1001 | sip:216.X.X.141 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 317 |  1001 | sip:216.X.X.142 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 303 |  1001 | sip:216.X.X.146 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 320 |  1001 | sip:216.X.X.171 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 321 |  1001 | sip:216.X.X.172 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 322 |  1001 | sip:216.X.X.173 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 323 |  1001 | sip:216.X.X.174 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
| 318 |  1001 | sip:216.X.X.147 | NULL   |     1 |      1 |        0 | 1000<br>
| Bah Cubes |<br>
+-----+-------+--------------------+--------+-------+--------+----------+-------+--------------+<br>
13 rows in set (0.00 sec)</p>

<p>mysql&gt; SELECT * FROM dispatcher WHERE setid=1007 ORDER BY state;<br>
+-----+-------+-------------------------+--------+-------+--------+----------+-------+---------------------------------------------+<br>
| id  | setid | destination             | socket | state | weight | priority |<br>
attrs | description                                 |<br>
+-----+-------+-------------------------+--------+-------+--------+----------+-------+---------------------------------------------+<br>
| 304 |  1007 | sip:216.X.X.139      | NULL   |     0 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 314 |  1007 | sip:216.X.X.175      | NULL   |     0 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 385 |  1007 | sip:216.X.X.177:5070 | NULL   |     0 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 307 |  1007 | sip:216.X.X.146      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 308 |  1007 | sip:216.X.X.147      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 309 |  1007 | sip:216.X.X.170      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 306 |  1007 | sip:216.X.X.142      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 311 |  1007 | sip:216.X.X.172      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 312 |  1007 | sip:216.X.X.173      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 313 |  1007 | sip:216.X.X.174      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 305 |  1007 | sip:216.X.X.141      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
| 310 |  1007 | sip:216.X.X.171      | NULL   |     1 |      1 |        0 |<br>
| DNIS Pool Endpoints       |<br>
+-----+-------+-------------------------+--------+-------+--------+----------+-------+---------------------------------------------+<br>
12 rows in set (0.00 sec)</p>

<p>This scenario occurs randomly - sometimes the desync occurs after start up, sometimes it takes a week to occur.  We have some endpoints in various dispatcher groups because there is a little bit of overlap between functions of the cubes, but we didn't want to use loadbalancer module.</p>

<p>We're using OpenSIPS 2.1.1 on Centos 6 x86_64 .  The dispatcher module parameters are default.  We do set <br>
fork=yes<br>
children=6<br>
And we launch opensips with -m 1024 and -M 64.</p>

<p>I have ruled out any interactions with mi_xmlrpc_ng commands - pcaps show no ds_set command sent during these periods where the desync occurred.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/711">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcif8TBFou0o5LNhj5HksSA1Brydrvks5pLPhTgaJpZM4Gr8i1.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/711"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>