<div dir="ltr"><div>It looks like the issue is with the replication, I've removed BDR from freeswitch database and freeswitch is flying again.. </div><div>Not sure whether it's BDR or VPS performance issue or something specific related to freeswitch DB..<br></div><div><br></div><div>If someone has experience running FS with postgre in the core and BDR your advices are very welcome! :)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 7, 2016 at 10:45 PM, Arsen <span dir="ltr"><<a href="mailto:arsen.semionov@gmail.com" target="_blank">arsen.semionov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi guys,</div><div><br></div><div>I am running two freeswitch instances in HA cluster in OVH cloud VPS.</div><div>with postgresql in the core</div><div>postgresql BDR master-master replication</div><div><br></div><div>sometimes (almost always) when I start/restart freeswitch service or mod_sofia I get errors:</div><div><br></div><div>2016-10-07 19:22:22.499304 [CRIT] switch_pgsql.c:360 Query (create index sr_call_id on sip_registrations (call_id)) took too long to complete or database not responding.</div><div>2016-10-07 19:22:22.599306 [CRIT] switch_pgsql.c:360 Query (insert into tasks (task_id, task_desc, task_group, task_runtime, task_sql_manager, hostname) values(1,'zrtp_cache_save','<wbr>core',1475869032,0,'fusion01-<wbr>2')) took too long to complete or database not responding.</div><div>2016-10-07 19:22:22.599306 [DEBUG] switch_pgsql.c:415 Query (insert into tasks (task_id, task_desc, task_group, task_runtime, task_sql_manager, hostname) values(2,'heartbeat','core',<wbr>1475868132,0,'fusion01-2')) returned PGRES_FATAL_ERROR</div><div>2016-10-07 19:22:22.599306 [ERR] switch_pgsql.c:656 Error executing query:</div><div>ERROR: current transaction is aborted, commands ignored until end of transaction block</div><div><br></div><div>..and sofia can not initialize profiles or only one profile or freeswitch fails to start at all</div><div><br></div><div>I can see some queries on freeswitch db with state=active when I execute (select * from pg_stat_activity) even when FS is down.</div><div><br></div><div><br></div><div>top - 19:39:38 up 3:07, 7 users, load average: 1.03, 1.04, 0.95</div><div>Tasks: 126 total, 2 running, 124 sleeping, 0 stopped, 0 zombie</div><div>%Cpu0 : 93.0 us, 0.3 sy, 0.0 ni, 6.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st</div><div>%Cpu1 : 7.1 us, 0.7 sy, 0.0 ni, 92.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st</div><div><br></div><div>Release: Debian 8.6</div><div>freeswitch 1.6.11~19~5e413fe-1~jessie+1 amd64</div><div>postgresql-bdr-9.4 9.4.9-1jessie</div><div>FS config is default</div><div><br></div><div>both VPS LAN interconnected</div><div>OpenStack KVM</div><div>2 vCores</div><div>2.4 GHz</div><div>8 GB RAM</div><div>40 GB SSD</div><div>Local RAID 10</div><div><br></div><div><br></div><div>any ideas ?</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-5638498632948595714gmail_signature">Regards,<br>Arsen.<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards,<br>Arsen.<br></div>
</div>