<p>It is match more better after fixing static registration. I have analyzed some remaining "Duplicate entry" errors.  It happens after SQL reconnect at least.</p>

<p>1.Try to update via <em>db_update_ucontact_ruid</em><br>
2. Missed SQL connection and getting <em>usrloc [ucontact.c:1055]: db_update_ucontact_ruid(): updating database failed</em>. But <strong>record was realy updated</strong>.<br>
3. Reconnect<br>
4. Try to update record again and getting <em>ul_dbf.affected_rows(ul_dbh)==0</em><br>
5. Try to insert and getting "Duplicate entry" every <em>usrloc:timer_interval</em> period up to exipre or re-register</p>

<p>Realy, maybe it is not an error</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/30#issuecomment-90963367">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZbkcwG0qIv_NLtwcnD8NBsUBeYF9ks5n9UuwgaJpZM4DRc8s.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/kamailio/kamailio/issues/30#issuecomment-90963367"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>