[Solved] Upgrade from 6.12.65-20 to 6.12.65-23 now very slow

I upgrade my system from 6.12.65-20 to 6.12.65-23 using the scripts.
Before the upgrade when I did an “Apply Config” it was taking around 20 seconds. Since the upgrade its taking over 5 minutes!

At the moment making any changes to the system is painful and not really usable.

Any suggestions as to where to look to see what’s causing the long delay?

Reboot …

I did reboot after the upgrade, perhaps another reboot will help. I’ll do that this evening when the system is quiet.

Just tried several reboots, sadly the “Apply Config” is still taking several minutes to run, whilst before upgrade it was about 20 seconds. During this long period the system doesn’t seem to be using much cpu or memory so that’s not slowing it down.
Any other ideas of where to look?

Try running it on the CLI:

amportal a r

Tried running from CLI, same long delay.
[[email protected] asterisk]# amportal a r

Fetching FreePBX settings with gen_amp_conf.php…
(about 4 minutes pause here…)
Successfully reloaded
[[email protected] asterisk]#

Watching FreePBX.log while this delay is taking place, the few lines either side of the long delay are below in case it gives any clues.

[2014-Dec-22 23:17:36] [PHP-NOTICE] (/drbd/httpd/www/html/admin/libraries/BMO/Freepbx_conf.class.php:455) - Undefined index: QUEUES_UPDATECDR
[2014-Dec-22 23:17:36] [PHP-NOTICE] (/drbd/httpd/www/html/admin/libraries/BMO/Freepbx_conf.class.php:458) - Undefined index: QUEUES_UPDATECDR
[2014-Dec-22 23:17:36] [PHP-NOTICE] (/drbd/httpd/www/html/admin/libraries/BMO/Freepbx_conf.class.php:462) - Undefined index: QUEUES_UPDATECDR
[2014-Dec-22 23:17:36] [PHP-NOTICE] (/drbd/httpd/www/html/admin/libraries/BMO/Freepbx_conf.class.php:471) - Undefined index: QUEUES_UPDATECDR
[2014-Dec-22 23:17:36] [PHP-NOTICE] (/drbd/httpd/www/html/admin/libraries/BMO/Freepbx_conf.class.php:475) - Undefined index: QUEUES_UPDATECDR

(4 Minutes pause here)

[2014-Dec-22 23:19:37] [PHP-DEPRECATION_WARNING] (/drbd/httpd/www/html/admin/libraries/BMO/GPG.class.php:510) - Comments starting with ‘#’ are deprecated in Unknown on line 21
[2014-Dec-22 23:19:37] [PHP-DEPRECATION_WARNING] (/drbd/httpd/www/html/admin/libraries/BMO/GPG.class.php:510) - Comments starting with ‘#’ are deprecated in Unknown on line 22

By the way we have about 22 extensions setup on the system so nothing very complicated.

The problem is with your system as it tries to resolve GPG servers. That is taking a very long time

Run this yourself:

su asterisk
gpg --refresh-keys

Many thanks, problem solved :smile:
Whilst the gpg --refresh-keys didn’t actually solve the problem it certainly pointed me in the right direction. Our firewall was blocking outgoing tcp 11371 which appears to be required for the key servers. Modified the firewall to allow this and the “Apply Config” is now back to taking only a few seconds. I guess something changed between 6.12.65-20 and 6.12.65-23 which now required this access.

Yes I meant to say that it’s probably locking up there. Of note we do eventually try port 80, but it’s probably waiting on 11371 then gives up and goes to 80 and by that time you want kill your machine. Glad you got it figured out!