<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><b></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><b></b></div><div><ol class="gmail-ak-ol" start="1" 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"><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" 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, Oct 21, 2025 at 11:14 AM Sasmita Panda <<a href="mailto:spanda@3clogic.com">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 \u003csip:hbh3a766@192.168.33.49:57670;transport=wss\u003e;expires=90","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>