<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">I would say mysql Aurora is not fair playing
      - if it keeps the conns up, it should also keep all the
      corresponding resources up (like the pre statements)....<br>
      <br>
      Maybe other apps are not using pre statements.<br>
      <br>
      Regards,<br>
    </font>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 11.11.2025 14:44, Sasmita Panda
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALf-Q46UJAZ5OwSMV3QenGxg1_Yu_hzFct_cn3HDoMqusCgbxg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi Bogdan-Andrei, </div>
        <div><br>
        </div>
        <div>It's aws mysql Aurora . AWS says the minor version of mysql
          server is zero downtime upgrade . So we didn't get any such
          message on the server side if all the connections got closed
          or what . </div>
        <div>There is no error or notification on the server side . 
          Other applications using the mysql SDK also run smoothly with
          this type of upgrade  . </div>
        <div><br>
        </div>
        <div>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr"><b><i>Thanks & Regards</i></b>
                  <div><i>Sasmita Panda</i></div>
                  <div><i>Senior Network Testing and Software Engineer</i></div>
                  <div><i>3CLogic , ph:07827611765</i></div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
      </div>
      <br>
      <div class="gmail_quote gmail_quote_container">
        <div dir="ltr" class="gmail_attr">On Tue, Nov 11, 2025 at
          4:18 PM Bogdan-Andrei Iancu <<a
            href="mailto:bogdan@opensips.org" moz-do-not-send="true"
            class="moz-txt-link-freetext">bogdan@opensips.org</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div> <font face="monospace">Hi Sasmita,<br>
              <br>
              At steps (3) + (4), if the db conn is not reset (from the
              OpenSIPS perspective), the statements are kept (of
              course). The question is - did the mysql upgrade triggered
              the closing of all DB conns in the mysql server?<br>
              <br>
              Regards,<br>
            </font>
            <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://www.siphub.com</a></pre>
            <div>On 22.10.2025 16:15, Sasmita Panda via Users wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hi All , </div>
                <div><br>
                </div>
                <div>Is there any update on this ? </div>
                <div><br>
                </div>
                <div>Just to elaborate the error a bit , I have opensips
                  running on eks cluster nodes and multiple opensips
                  nodes used to connect to the same RDS (Aurora mysql). </div>
                <div>On the RDS side there was a minor version upgrade
                  from  <span
style="color:rgb(15,20,26);font-family:"Amazon Ember","Helvetica Neue",Roboto,Arial,sans-serif;font-size:14px">8.0.mysql_aurora.3.07</span> 
                  to <span
style="color:rgb(15,20,26);font-family:"Amazon Ember","Helvetica Neue",Roboto,Arial,sans-serif;font-size:14px">8.0.mysql_aurora.3.08.2
                    . After upgrade when register request comes to
                    opensips </span></div>
                <div><span
style="color:rgb(15,20,26);font-family:"Amazon Ember","Helvetica Neue",Roboto,Arial,sans-serif;font-size:14px">and
                    it goes to insert the data in the DB. It gives the
                    above error which I shared earlier . </span></div>
                <div><span
style="color:rgb(15,20,26);font-family:"Amazon Ember","Helvetica Neue",Roboto,Arial,sans-serif;font-size:14px"><br>
                  </span></div>
                <div><b>CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute:
                    driver error (1243): Unknown prepared statement
                    handler (5) given to mysql_stmt_precheck</b><span
style="color:rgb(15,20,26);font-family:"Amazon Ember","Helvetica Neue",Roboto,Arial,sans-serif;font-size:14px"></span></div>
                <div><b>ERROR:usrloc:db_insert_ucontact: inserting
                    contact in db failed","attributes</b></div>
                <div><b>ERROR:usrloc:wb_timer: inserting contact into
                    database failed</b></div>
                <div><b><br>
                  </b></div>
                <div><b>As for my understanding : </b></div>
                <div><span
style="color:rgb(41,42,46);font-family:"Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif;font-size:14px">During
                    the Aurora mysql upgrade from 3.07 to 3.08.2 </span></div>
                <div>
                  <ol
style="margin:12px 0px 0px;padding:0px 0px 0px 24px;box-sizing:border-box;display:flow-root;color:rgb(41,42,46);font-family:"Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif;font-size:14px"
                    start="1">
                    <li>
                      <p
style="margin:0px;padding:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;line-height:1.714">All
                        old DB sessions are terminated and reset . </p>
                    </li>
                    <li style="margin-top:4px">
                      <p
style="margin:0px;padding:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;line-height:1.714">The
                        Auro engine restarts and resets all session
                        level state . </p>
                    </li>
                    <li style="margin-top:4px">
                      <p
style="margin:0px;padding:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;line-height:1.714">However
                        opensips SB driver (db_mysql) still holds
                        references to old prepared statement in an old
                        connection pool . </p>
                    </li>
                    <li style="margin-top:4px">
                      <p
style="margin:0px;padding:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;line-height:1.714">When
                        the connection is reused by opensips after
                        upgrade , those handels does not exists anymore
                        and hence → driver Error 1243 appears in
                        opensips logs (invalid prepared statement and
                        failed to insert data in the database ) . </p>
                    </li>
                    <li style="margin-top:4px">
                      <p
style="margin:0px;padding:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;line-height:1.714">Once
                        we restarted the pods the connection pool from
                        opensips side also got reset and hence the issue
                        got resolved . </p>
                    </li>
                  </ol>
                </div>
                <div><b><br>
                  </b></div>
                <div><b>But restart is not suitable for live environment
                    . So is there any other option to recover this
                    automatically . On opensips module documentation for
                    db_mysql </b></div>
                <div><b>I am not getting any such parameter to set . Do
                    I need to update the mysql client version to ?
                    Please suggest . </b></div>
                <div><b><br>
                  </b></div>
                <div>
                  <div dir="ltr" class="gmail_signature">
                    <div dir="ltr">
                      <div>
                        <div dir="ltr"><b><i>Thanks & Regards</i></b>
                          <div><i>Sasmita Panda</i></div>
                          <div><i>Senior Network Testing and Software
                              Engineer</i></div>
                          <div><i>3CLogic , ph:07827611765</i></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <br>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Tue, Oct 21, 2025
                  at 11:14 AM Sasmita Panda <<a
                    href="mailto:spanda@3clogic.com" target="_blank"
                    moz-do-not-send="true" class="moz-txt-link-freetext">spanda@3clogic.com</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">
                    <div>Hi All , </div>
                    <div><br>
                    </div>
                    <div>I am using opensips 3.4 running on EKS node and
                      the database is AWS RDS (<span
style="color:rgb(15,20,26);font-family:"Amazon Ember","Helvetica Neue",Roboto,Arial,sans-serif;font-size:14px">8.0.mysql_aurora.3.08.2</span>)
                      . </div>
                    <div><br>
                    </div>
                    <div>In the config  I am using sql_only mode to
                      save/extract data from the database . </div>
                    <div><br>
                    </div>
                    <div>loadmodule "usrloc.so"<br>
                      modparam("usrloc", "nat_bflag", "NAT")<br>
                      modparam("usrloc", "working_mode_preset",
                      "sql-only")<br>
                      modparam("usrloc", "db_url",
                      "mysql://mysql-user:mysql-pass@mysql-domain/dbname")<br>
                      modparam("usrloc", "use_domain", 1)<br>
                      modparam("usrloc", "max_contact_delete", 1)<br>
                      <br>
                    </div>
                    <div>        if ($rm=="REGISTER") {<br>
                       xlog( "L_NOTICE", "Register Contact & $ct \n"
                      );<br>
                                      fix_nated_register();<br>
                                           
                       if(!save("location","force-registration,max-contacts=10,path-lazy"))<br>
                                                sl_reply_error();<br>
                                      exit;<br>
                              }<br>
                      <br>
                    </div>
                    <div><br>
                    </div>
                    <div>Below is the error I am getting in the opensips
                      logs : </div>
                    <div><br>
                    </div>
                    <div>2025-10-20 00:30:03.120 <br>
                      {"body":"Oct 19 19:00:03 [36] NOTICE:Register
                      Contact \u0026
                      \<a
href="mailto:u003csip:hbh3a766@192.168.33.49:57670;transport=wss%5Cu003e;expires=90"
                        target="_blank" moz-do-not-send="true">u003csip:hbh3a766@192.168.33.49:57670;transport=wss\u003e;expires=90</a>","attributes":{"log.file.path":"/var/log/pods/eks-opensips_west-registrar-f5c5896d4-rgn8d_44da0dac-0521-4e1b-b4e7-89c7f0f87c11/west-registrar/0.log","log.iostream":"stderr","logtag":"F"},"resources":{"k8s.container.restart_count":"0","k8s.pod.uid":"44da0dac-0521-4e1b-b4e7-89c7f0f87c11"}}<br>
                      2025-10-20 00:30:03.121 <br>
                      {"body":"Oct 19 19:00:03 [36]<b>
                        CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute:
                        driver error (1243): Unknown prepared statement
                        handler (5) given to
                        mysql_stmt_precheck","attributes</b>":{"log.file.path":"/var/log/pods/eks-opensips_west-registrar-f5c5896d4-rgn8d_44da0dac-0521-4e1b-b4e7-89c7f0f87c11/west-registrar/0.log","log.iostream":"stderr","logtag":"F"},"resources":{"k8s.container.restart_count":"0","k8s.pod.uid":"44da0dac-0521-4e1b-b4e7-89c7f0f87c11"}}<br>
                      2025-10-20 00:30:03.121 <br>
                      {"body":"Oct 19 19:00:03 [36]<b>
                        ERROR:usrloc:db_insert_ucontact: inserting
                        contact in db failed","attributes":</b>{"log.file.path":"/var/log/pods/eks-opensips_west-registrar-f5c5896d4-rgn8d_44da0dac-0521-4e1b-b4e7-89c7f0f87c11/west-registrar/0.log","log.iostream":"stderr","logtag":"F"},"resources":{"k8s.container.restart_count":"0","k8s.pod.uid":"44da0dac-0521-4e1b-b4e7-89c7f0f87c11"}}<br>
                      2025-10-20 00:30:03.121 <br>
                      {"body":"Oct 19 19:00:03 [36]<b>
                        ERROR:usrloc:wb_timer: inserting contact into
                        database failed</b>","attributes":{"log.file.path":"/var/log/pods/eks-opensips_west-registrar-f5c5896d4-rgn8d_44da0dac-0521-4e1b-b4e7-89c7f0f87c11/west-registrar/0.log","log.iostream":"stderr","logtag":"F"},"resources":{"k8s.container.restart_count":"0","k8s.pod.uid":"44da0dac-0521-4e1b-b4e7-89c7f0f87c11"}}<br>
                    </div>
                    <div><br>
                    </div>
                    <div>*** I have 2 instance on which opensips running
                      and the Database is common for both . </div>
                    <div><br>
                    </div>
                    <div>
                      <div dir="ltr" class="gmail_signature">
                        <div dir="ltr">
                          <div>
                            <div dir="ltr"><b><i>Thanks & Regards</i></b>
                              <div><i>Sasmita Panda</i></div>
                              <div><i>Senior Network Testing and
                                  Software Engineer</i></div>
                              <div><i>3CLogic , ph:07827611765</i></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>