ElvishArtisan / rivendell

A full-featured radio automation system targeted for use in professional broadcast and media environments
197 stars 63 forks source link

4.2.2 Changing user is very slow and causes RDAirPlay to freeze (but eventually recovers) #963

Open vizubeat opened 1 month ago

vizubeat commented 1 month ago

When switching user via either the RDLogin utility or RML (we have buttons on the sound panel that execute something like LO user1 password!), the login process is very slow - sometimes taking up to 10 seconds. This is disconcerting because RDAirPlay freezes during this time. It does eventually recover, but if there is a transition taking place during the login process, that transition will not start or complete until the login process has completed.

Additionally on Ubuntu Jammy, you get the Ubuntu 'application not responding' warning. I've gotten around this by increasing the gnome timeout to 60 seconds with gsettings set org.gnome.mutter check-alive-timeout 60000 - but still having RDAirPlay freeze is problematic.

Logins for users that have already logged in are very speedy, and refreshes of their user panels are instant, so I'm not sure why the initial login is so slow.

vizubeat commented 1 month ago

Looks like this is to do with SQL performance - running the same login RML on a machine with the database on localhost, it's down to about 3 seconds to complete the login. Hope that helps.

ElvishArtisan commented 1 month ago

How many System and User sound panels do you have configured on those instances?

vizubeat commented 1 month ago

1 system panel on each host (4 hosts total at this time but originally just 2 (server and client)), 5 user panels per user (but only about 20-30 buttons configured for about 18 of the users), 23 users total including 'admin', but I was also seeing this ~10 second login time when there were only 3 users added to the database.

ElvishArtisan commented 1 month ago

Unable to reproduce the problem here.

vizubeat commented 1 month ago

This might be because I'm working with an old database imported from 1.7.2 - i will spin up a new setup with a blank database, see if the problem remains, and I will come back to you.

vizubeat commented 1 month ago

I have a (crude) video showing the issue, can I email it to you so you can see what's happening?

vizubeat commented 1 month ago

I have a test setup with blank installation of 4.2.2, switching users does still cause RDAirPlay to freeze for about a second - this is a standalone installation on a Proxmox VM so there is no LAN overhead, but I can see how it might appear to stall if this were a server/client setup. I will send on the video from the other physical server/client setup to illustrate the video.