Hi All ,
Is there any update on this ?
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).
On the RDS side there was a minor version upgrade from
8.0.mysql_aurora.3.07 to 8.0.mysql_aurora.3.08.2 . After upgrade
when register request comes to opensips
and it goes to insert the data in the DB. It gives the above
error which I shared earlier .
*CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver
error (1243): Unknown prepared statement handler (5) given to
mysql_stmt_precheck*
*ERROR:usrloc:db_insert_ucontact: inserting contact in db
failed","attributes*
*ERROR:usrloc:wb_timer: inserting contact into database failed*
*
*
*As for my understanding : *
During the Aurora mysql upgrade from 3.07 to 3.08.2
1.
All old DB sessions are terminated and reset .
2.
The Auro engine restarts and resets all session level state .
3.
However opensips SB driver (db_mysql) still holds references
to old prepared statement in an old connection pool .
4.
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 ) .
5.
Once we restarted the pods the connection pool from opensips
side also got reset and hence the issue got resolved .
*
*
*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 *
*I am not getting any such parameter to set . Do I need to update
the mysql client version to ? Please suggest . *
*
*
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/
On Tue, Oct 21, 2025 at 11:14 AM Sasmita Panda
<[email protected]> wrote:
Hi All ,
I am using opensips 3.4 running on EKS node and the database
is AWS RDS (8.0.mysql_aurora.3.08.2) .
In the config I am using sql_only mode to save/extract data
from the database .
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "working_mode_preset", "sql-only")
modparam("usrloc", "db_url",
"mysql://mysql-user:mysql-pass@mysql-domain/dbname")
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "max_contact_delete", 1)
if ($rm=="REGISTER") {
xlog( "L_NOTICE", "Register Contact & $ct \n" );
fix_nated_register();
if(!save("location","force-registration,max-contacts=10,path-lazy"))
sl_reply_error();
exit;
}
Below is the error I am getting in the opensips logs :
2025-10-20 00:30:03.120
{"body":"Oct 19 19:00:03 [36] NOTICE:Register Contact \u0026
\u003csip:[email protected]:57670;transport=wss\u003e;expires=90
<mailto:u003csip:[email protected]:57670;transport=wss%5Cu003e;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"}}
2025-10-20 00:30:03.121
{"body":"Oct 19 19:00:03
[36]*CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute:
driver error (1243): Unknown prepared statement handler (5)
given to
mysql_stmt_precheck","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"}}
2025-10-20 00:30:03.121
{"body":"Oct 19 19:00:03
[36]*ERROR:usrloc:db_insert_ucontact: inserting contact in db
failed","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"}}
2025-10-20 00:30:03.121
{"body":"Oct 19 19:00:03 [36]*ERROR:usrloc:wb_timer:
inserting contact into database
failed*","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"}}
*** I have 2 instance on which opensips running and the
Database is common for both .
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users