I am working with in App with Appsmith connected to a MySQL server. When I am running my app and perform a single query, I see that 5-10 sessions are opened in my server (due to connection pooling). The issue is that these sessions rest in sleep mode so when I perform new queries, appsmith keeps opening more sessions and I quickly max up the max user capacity of my server (currently set at 100 max user connections). When my server is maxed up and I keep using my app, some of my queries start giving errors (queries could not be executed). I have tried to increase this maximum but my server provider says he can’t do it (mentioning the 100 is already quite a lot). I am wondering if there is any workaround that - thanks!!
Could you check mysql.conf and see what is the value of wait_timeout and interactive_timeout . Let us know what are the values, for the meantime you can try decreasing the value to 300 (5 minutes). This will require a db restart.
Thanks - I can’t change these as global variables (only session) since my db is shared with other users. Is there a way I can work around it? If I set the session variables to 300, it only affects 1 of the multiple sessions that are opened by appsmith using connection pool
I understand. I have opened a feature request for this. You can try using the workaround I provided to the previous user to mitigate your problem. The team will implement this feature soon. If you have any further questions, I’m happy to help.