Category: Question and Answers
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

How to pause Appsmith from connecting to a database?

Issue

I needed to redeploy the database, but the connections were maxed out. So, I had to shut down some connections that could be put on hold. Now, I'm trying to find instructions on how to stop the instance on the site.

Resolution

If you need to redeploy your database, but your connections are maxed out, you will need to shut down some of those connections to free up resources. To do this, you can put connections on hold or stop the database instance altogether.

If you are using a self-hosted database instance, you can stop it by using the appropriate command. For example, if you are using MySQL, you could use the following command:

sudo /etc/init.d/mysql stop

This will stop the MySQL instance and free up any resources that were being used by your database.

Alternatively, you could change the datasource URL to point to a temporary database or another location, effectively stopping any new connections from being made. When you are ready to resume normal operations, simply change the URL back to its original value.

For example, if you are using a Java-based application and your original datasource URL is:

jdbc:mysql://localhost/mydatabase

You could change it to:

jdbc:mysql://tempdatabase/mydatabase

This will stop any new connections from being made to the original database and direct them to the temporary database instead.

Overall, the key is to free up resources by either stopping the instance or redirecting traffic to a different location.