FreePBX Distro Hangs on Updates in GUI

I am having an issue with performing updates via the GUI. I perform he updates frequently but I have noticed for at least several months if I select all the updates and process them all at once it will hang before they are complete. I have to close the browser and open it again and run the remaining updates. If an update was not completed I have to force the module to download and reinstall. From the command line I don’t have any problem performing updates it only happens in the GUI. I have 5 separate PBX systems, all are updated frequently. They all exhibit the same issue, not necessarily on the same update. I suspect it may be related to timing (in the GUI). I dont seem to see a difference in IE vs Chrome. Any suggestions? On one of my servers running FreePBX I just did an update and it hung.The console (i.e. GUI ) no longer responds. The RSH console does work but when I run “fwconsole ma updateall” I now get an exception. Previous failures caused GUI issues but never console issues. I ran this on a backup server so I can just restore it, its bricked.

The issue is two fold. In that the way freepbx is designed is that it uses native php sessions. When a session is opened the file is locked.

As an example, If you are doing anything in the gui longer than a second and you go and open another browser tab the gui won’t respond because you are effectively “locked out” until the first session process completes. (This is an example. You aren’t locking yourself out because you opened a new tab or window. It just demonstrates the problem that I am trying to explain)

You’ll see users complaining that freepbx is frozen or stuck but in reality it’s not. PHP is just waiting for the previous session to close before you can do anything against the same session.

You can get around this by going incognito mode or clearing your cookies completely. Or just waiting.

On top of that, module admin in the GUI uses something called SSE. That stands for server side events. Over the last few years browsers have changed how they deal with server side events which has ended up causing complications for freepbx.

There arent really any good solutions for freepbx because the best solution is a websocket server but lots of people run freepbx with self signed certificated which causes all sort of issues.

If it’s frozen or you think you are locked out then just run: service httpd restart

1 Like

ignore the specific error I got, that was easily corrected by increasing the max_connections on mysql, restarting and then I did the command line command to do all updates and everything is fine. The real issue is something timing out and locking up in the GUI. Only happens if there are more than a few updates to load and I say to do them all.

I didnt open another window, it happens if I open chrome, goto my PBX, list all modules to update, click download all, and then process all. Hangs after a few modules are updated (could be 30 seconds, or 2 minutes). GUI is bricked after that.

I already answered why this is happening. The GUI isn’t “bricked” the session is locked. This is why service httpd restart works because the session is unlocked.

You want suggestions. There aren’t any. Sorry. I tried to thoughtfully explain why it’s happening.

Why don’t you. You know. Post the exception. Instead of making everyone guess.

Bricked is such a wrong term. If it was Bricked you’d throw it in the trash. But you can get into the CLI. So it’s not Bricked. Help everyone out and post the errors. We can go from there.

I already fixed the exception that I am not worried about. My issue is that I open 1 session in a browser for freepbx, tell it to update all modules and it stops part way through, you say the gui is locked, thats an issue. There is no reason the session should lock on the update. I did not open another browser tab. I didnt even change windows focus to any other program. I no longer do any updates via the GUI as in most cases I can not close the window and reconnect to the GUI, it either gives me an exception or in some cases never responds and I have to manually restart the server. I have left it for hours and it NEVER completes or makes any progress.

I already answered all of this and I never said you opened another window. Please reread what I wrote, I edited it to make better sense.

I feel like we are just going in circles now. I even confirmed that session locking is an issue and you are still arguing.

All you have to do it restart http (which I said previously) as that will release the session lock.

Are we working on a solution. Yes. But I have zero suggestions for you besides restarting httpd.

I don’t think there’s anything more to say about it. Its honestly frustrating to have explained this whole problem and why it’s an issue for what I wrote to just be completely ignored.

1 Like