[Freeswitch-users] FS can't reconnect to PostgreSQL database

Frédérick Pruneau frederick at targointernet.com
Wed May 29 12:50:57 UTC 2019


Thanks Giovanni,

I will fix this ASAP. Thanks all for your support!

Le 19-05-29 à 03 h 30, Giovanni Maruzzelli a écrit :
> actually the parameter is in switch.conf.xml:
>
> <!-- The system will create all the db schemas automatically, set this 
> to false to avoid this behaviour -->
>     <!-- <param name="auto-create-schemas" value="true"/> -->
>
> You will need to uncomment it, andd set it to false
>
> -giovanni
>
> On Wed, May 29, 2019 at 8:49 AM Giovanni Maruzzelli <gmaruzz at gmail.com 
> <mailto:gmaruzz at gmail.com>> wrote:
>
>     Fredrick, no, that is a very bad idea.
>
>     Mike was rwferring to disable the freeswitch feature that manage
>     the db schema (eg, drop and create tables) at startup.
>
>     This can be configured in vars.conf.xml or in some other xml
>     config file, near where you config the dsn to access the db.
>
>     So, freeswitch will not emit ddl commands.
>
>
>
>
>     On Wed, May 29, 2019, 06:54 Frédérick Pruneau
>     <frederick at targointernet.com <mailto:frederick at targointernet.com>>
>     wrote:
>
>         Thanks for your help.
>
>         I have found this to remove DDL locks and it works. I don't
>         know if it is a good way:
>
>         SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE
>         datname = 'freeswitch';
>
>         ALTER ROLE $db_user SET bdr.permit_ddl_locking = false;
>
>         I will check to disable schema management features.
>
>         Le 19-05-10 à 16 h 26, Mike Jerris a écrit :
>>         If you are using shared db you should be disabling the
>>         features for managing the schema.  The issue is you will need
>>         to manually maintain your schema.  Almost always we manage
>>         schema it a way that is backwards compatible so you can do
>>         staged upgrades if you manually add to the tables.
>>
>>>         On May 10, 2019, at 5:45 AM, Praveen Chourasia
>>>         <praveen.chourasia at outlook.com
>>>         <mailto:praveen.chourasia at outlook.com>> wrote:
>>>
>>>         Hi Frédérick,
>>>
>>>         PostgreSQL BDR uses 'Master-Master' replication and requires
>>>         locking if any of the PostgreSQL BDR nodes (that are in
>>>         replication cluster) executes DDL SQL queries. It causes the
>>>         whole cluster to lock as far as I remember.
>>>
>>>         The reason you may be experiencing the database getting
>>>         locked when you restart one of the FreeSWITCH nodes is that
>>>         FreeSWITCH upon its start/restart executes DDL queries.
>>>
>>>         FreeSWITCH AFAIK unconditionally executes 'DROP
>>>         TABLE/VIEW...' and 'CREATE TABLE/VIEW ...' for tables like
>>>         'channels', 'calls', 'interfaces', 'tasks' (TABLES) &
>>>         'detailed_calls', 'basic_calls' (VIEWS) that ultimately
>>>         leads to PostgreSQL BDR getting locked.
>>>
>>>         -- 
>>>         *Praveen Chourasia*
>>>
>>>         ------------------------------------------------------------------------
>>>         *From:*FreeSWITCH-users
>>>         <freeswitch-users-bounces at lists.freeswitch.org
>>>         <mailto:freeswitch-users-bounces at lists.freeswitch.org>> on
>>>         behalf of Frédérick Pruneau <frederick at targointernet.com
>>>         <mailto:frederick at targointernet.com>>
>>>         *Sent:*Monday, May 6, 2019 7:38 PM
>>>         *To:*freeswitch-users at lists.freeswitch.org
>>>         <mailto:freeswitch-users at lists.freeswitch.org>
>>>         *Subject:*[Freeswitch-users] FS can't reconnect to
>>>         PostgreSQL database
>>>         Hi guys,
>>>
>>>         I have an issue with FS unable to reconnect to postgresql
>>>         database. Here
>>>         is the setup: 2 FreeSWITCH servers with 2 postgresql
>>>         servers. Each
>>>         freeswitch is connected to 1 postgresql server. DB servers
>>>         are synced
>>>         with BDR. It was working very well until I restarted
>>>         freeswitch service
>>>         on one of the servers. Then, I got theses errors showing up on
>>>         freeswitch console:
>>>
>>>         switch_pgsql.c:384 Query X took too long to complete or
>>>         database not
>>>         responding.
>>>
>>>         database is locked against ddl by another node
>>>
>>>         I followed some guides to remove locks with these commands:
>>>
>>>         SELECT * FROM pg_stat_activity;
>>>         SELECT pg_terminate_backend(${pid});
>>>
>>>         But the issue is still there. Do you have an idea how to fix
>>>         this issue?
>>>
>>>         Thanks.
>>>
>>
>>
>>         _________________________________________________________________________
>>
>>         The FreeSWITCH project is sponsored by SignalWirehttps://signalwire.com
>>         Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
>>         Build your next product on our scalable cloud platform.
>>
>>         Join our online community to chat in real timehttps://signalwire.community
>>
>>         Professional FreeSWITCH Services
>>         sales at freeswitch.com  <mailto:sales at freeswitch.com>
>>         https://freeswitch.com
>>
>>         Official FreeSWITCH Sites
>>         https://freeswitch.com/oss
>>         https://freeswitch.org/confluence
>>         https://cluecon.com
>>
>>         FreeSWITCH-users mailing list
>>         FreeSWITCH-users at lists.freeswitch.org  <mailto:FreeSWITCH-users at lists.freeswitch.org>
>>         http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>         UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>         https://freeswitch.com
>         -- 
>         	*Frédérick Pruneau *| Spécialiste VoIP
>
>         *T * 514.448.0773 * #* 121
>         *E * frederick at targointernet.com
>         <mailto:frederick at targointernet.com>
>
>         <http://www.targo.ca>
>         	
>         <https://fr-ca.facebook.com/pages/category/Local-Business/Targo-Communications-176964412324634/>
>
>         <https://goo.gl/maps/MQtJ4S3rYLP537ss7>
>
>         _________________________________________________________________________
>
>         The FreeSWITCH project is sponsored by SignalWire
>         https://signalwire.com
>         Enhance your FreeSWITCH install with disruptive priced SMS and
>         PSTN services.
>         Build your next product on our scalable cloud platform.
>
>         Join our online community to chat in real time
>         https://signalwire.community
>
>         Professional FreeSWITCH Services
>         sales at freeswitch.com <mailto:sales at freeswitch.com>
>         https://freeswitch.com
>
>         Official FreeSWITCH Sites
>         https://freeswitch.com/oss
>         https://freeswitch.org/confluence
>         https://cluecon.com
>
>         FreeSWITCH-users mailing list
>         FreeSWITCH-users at lists.freeswitch.org
>         <mailto:FreeSWITCH-users at lists.freeswitch.org>
>         http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>         UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>         https://freeswitch.com
>
>
>
> -- 
> Sincerely,
>
> Giovanni Maruzzelli
> OpenTelecom.IT
> cell: +39 347 266 56 18
>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-- 
	*Frédérick Pruneau *| Spécialiste VoIP

*T * 514.448.0773 * #* 121
*E * frederick at targointernet.com

<http://www.targo.ca>
	
<https://fr-ca.facebook.com/pages/category/Local-Business/Targo-Communications-176964412324634/>

<https://goo.gl/maps/MQtJ4S3rYLP537ss7>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20190529/be228636/attachment-0001.html>


More information about the FreeSWITCH-users mailing list