When you say the app stops working until the database is cleared — do you mean you have to clear your app’s database? If so, I highly recommend designing your app so that it handles the EGRESS_ENDING state, which can take several minutes to clean up the egress.
Are you using LiveKit Cloud? If so, you can send us your
wss://
url that your clients use to connect and we can try to take a look at your egresses to debug.