Slow reloads


(Sam Shomi) #1

Is there anything that can be done about the slow reloads when we apply settings on servers running in remote datacenters? It seems to keep getting worse with each new version of Freepbx. I think it is partly because of all the css and js that is loaded. It was never a problem with Freepbx v12. Seems to have started with v13 and I think it’s even worse on v15.

Disabling signature checking seems to help a little. We have never had that feature protect us from hackers anyways and they seem to have found ways around it now so we just disable it by default.


#2

What ways?

BTW, my FreePBX 15 reloads are 2-3 seconds.

Are you reloading a giant config?


(Sam Shomi) #3

It’s just a standard install. From scratch on D9 or CE7 or distro. Doesn’t matter. This is remotely. Not local. And remotely up to 2000km away. Not local datacenters. The back and forth latency has a lot to do with it. It’s all kinds of datacenters and all kinds of installs. Not some isolated issue.


(Lorne Gaetz) #4

There is no such thing as a standard install. From the config side, reload times are greatly affected by extension count, user count, number of conferences/queues/etc. On the hardware side it will be affected by the host and vm resources. My colleague @slobera just did some testing on this, and found sub 60 second reloads for a 1000 user system with both conferences and queues.


(Sam Shomi) #5

Assume fresh install with all defaults and no entensions or trunks or anything else configured. Empty DB etc.

It’s usually just the first apply. After that the browser caches the css and js so subsequent apply is usually (but not always) faster. To continuously see it open the browser in incognito mode and do and F5 reload before each APPLY.

In a datacenter a few hundred miles away it’s fine. In a datacenter on the other side of North America it is really slow.


#6

I am remote also, but our experiences seem to differ. If you don’t think it has anything to do with the size of the config, you can get more specific by opening the developer console and seeing which resources are taking longer to load.


#7

If you are affected by the speed of the Internet then what is your request here? I don’t think anyone can help you there.

Edit - oh you did the thing where someone asks questions and you go back and edit your earlier posts so that we look dumb for asking what was already stated.


(Sam Shomi) #8

I have fiber and speed tests are fine. Usually 20Mb/s minimum both ways. It’s the latency due to the speed of light.


(Lorne Gaetz) #9

Rule the browser out by doing:

# time fwconsole r
Reload Started
Reload Complete

real    0m23.874s
user    0m5.592s
sys     0m2.195s

Still haven’t seen an actual time shared.


(Sam Shomi) #10

All the developer console tells me is that it is waiting for ajax.

It waited 15seconds on this run


(Sam Shomi) #11

[root@pbx1 ~]# time fwconsole r
Reload Started
Reload Complete

real 0m2.459s
user 0m0.558s
sys 0m0.261s
[root@pbx1 ~]# time fwconsole r
Reload Started
Reload Complete

real 0m2.354s
user 0m0.584s
sys 0m0.216s
[root@pbx1 ~]# time fwconsole r
Reload Started
Reload Complete

real 0m3.170s
user 0m0.543s
sys 0m0.271s


(Sam Shomi) #12

There is something that is causing AJAX to wait but I am not quite sure what. Since it was only from browser, not command line, and usually just happening on the first apply I assumed it was waiting for uncached css/js to load. I’m not sure about that though.


(Lorne Gaetz) #13

Whatever the delay is, it’s not a reload.


(Sam Shomi) #14

It’s on firefox and chrome so it’s not the browser either. Multiple computers.


#15

Is your dashboard slow to load also? I have seen that when the hostname is set wrong on the server. (set a valid FQDN associated with 127.0.0.1 or IP address on the network interface)


(Sam Shomi) #16

The dashboard seems to load fine. That was a problem before yes. Where it sat saying “Loading” at 75% for awhile. I think that was related to signature checking where there was some change with the signature system and it wasn’t working or something. I haven’t seen that in awhile so I think that is fixed now.

I have read about that problem with DNS but I don’t have that problem because I already have that setting in my /etc/hosts.


(Sam Shomi) #17

I also remove rss feeds. That seems to help a little.


(Sam Shomi) #18

How long should reloads normally be? I seem to be getting about 5 to 6 seconds on average with a nearby server with signature checking disabled but it still sometimes waits for up to around 15 seconds.


(Sam Shomi) #19

Anyone?


(Jerry Riggin) #20

I have never seen reload times of 5-6 seconds, even on a new installation. Here’s a few typical examples:

FreePBX 15, 8 cores, 16G RAM, 185 Extensions, 10 Queues

time fwconsole r
Reload Started
Reload Complete

real    0m25.489s
user    0m10.790s
sys     0m4.048s

FreePBX 14, 48 Cores, 126G RAM, 2000+ extensions, 653 Queues, 2483 Inbound Routes:

time fwconsole r
Reloading FreePBX
Successfully reloaded

real    1m39.610s
user    0m10.513s
sys     0m3.147s

It really depends on how much data has to be pulled from the database and written to /etc/asterisk and what hardware is available to do it. It has NOTHING to do with your bandwidth to the server when done over SSH. Maybe FreePBX XX will use all realtime and there won’t be reload times.