opencast / opencast-admin-interface

A modern admin user interface for Opencast
https://admin-interface.opencast.org
Educational Community License v2.0
1 stars 22 forks source link

Maintenance tab is incredibly laggy #689

Open gregorydlogan opened 3 weeks ago

gregorydlogan commented 3 weeks ago

Try setting your server to maintenance mode. Just wait, it'll happen eventually...

It's reflected in the backend immediately, but the UI is very slow to react. 30+ seconds by my count.

Arnei commented 2 weeks ago

The cause for this seems to lie with the backend. The admin ui backend caches server information for 60 seconds before getting new information, so it can take up to a minute before the admin ui is informed about any changes: https://github.com/opencast/opencast/blob/74b784d5f68b0c8bad7c47b453718b6c5b670799/modules/admin-ui/src/main/java/org/opencastproject/adminui/endpoint/ServerEndpoint.java#L269

Quoting the commit that introduced the caching:

Cache Server Statistics

This add caching to the admin interface's server statistics endpoint to avoid putting a high load on the database by having this open multiple times. (https://github.com/opencast/opencast/pull/2851)

So we probably don't want to remove caching. A higher refresh rate might work, but also increases the risk of overwhelming the database. Alternatively, figuring out why this in particular generates such a high load and make it not do that is probably the ideal, but also more time-consuming approach.