#211 db_virtual no DB connection available if pool member lost

1.6.x
closed-out-of-date
Razvan
modules (454)
5
2015-04-06
2009-11-02
No

This is easily duplicated on 1.6.0 with postgres. I have a pool of 5 pgsql servers that I point at for avpops, auth_db, and uri. If any one of them becomes unavailable, I can no longer do anything with the db_virtual pool (registrations can not complete, etc.) and must remove the problem db server and restart OpenSIPS.

Discussion

  • Bogdan-Andrei Iancu

    Hi Daryl,

    what mode do you use for the virtual connection - parallel, failover, round-robin ?

    Also, do you have some logs/debug during the error?

    Regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> rpistolea
     
  • Razvan

    Razvan - 2009-11-05

    what mode are you using?
    what do you mean by "pool"? fails before a query or an insert?
    does the exported MI db_set/db_get work (to ignore the failed one by hand?)?

     
  • Daryl G. Jurbala

    Sorry all, I didn't get the notifications on this asking for more information.

    What I have seen happening with my round-robin pool of read-only PG servers (5 of them) is that if one goes down, opensips stops with this in the log:

    b 20 15:39:04 sfsbc03 /sbin/opensips[26515]: ERROR:db_postgres:db_postgres_store_result: 0x7af468
    - invalid query, execution aborted
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26515]: ERROR:db_postgres:db_postgres_store_result: 0x7af468:
    PGRES_FATAL_ERROR
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26515]: ERROR:db_postgres:db_postgres_store_result: 0x7af468:
    server closed the connection unexpectedly This probably means the server terminated abnormally
    before or while processing the request.
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26515]: ERROR:core:db_do_query: error while storing result
    Feb 20 15:39:04 sfsbc03 kernel: opensips[26515]: segfault at 0000000000000020 rip 00002ae790c824b4 r
    sp 00007fffc410a030 error 4
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26508]: ERROR:db_postgres:db_postgres_store_result: 0x7af468
    - invalid query, execution aborted
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26508]: ERROR:db_postgres:db_postgres_store_result: 0x7af468:
    PGRES_FATAL_ERROR
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26508]: ERROR:db_postgres:db_postgres_store_result: 0x7af468:
    server closed the connection unexpectedly This probably means the server terminated abnormally
    before or while processing the request.
    Feb 20 15:39:04 sfsbc03 /sbin/opensips[26508]: ERROR:core:db_do_query: error while storing result
    Feb 20 15:39:04 sfsbc03 kernel: opensips[26508]: segfault at 0000000000000020 rip 00002ae790c824b4 r
    sp 00007fffc410a030 error 4
    Feb 20 15:39:05 sfsbc03 /sbin/opensips[26450]: NOTICE:db_virtual:destroy: destroy module bla bla...

    I then have to re start opensips manually.

     
  • Bogdan-Andrei Iancu

    • status: open --> closed-out-of-date
     

Log in to post a comment.