0

We have multiple databases in a single RDS instance. Because of any reason if we have load in 1 database it stops all the databases. I'm not able to move any of the database because of following reasons:

  1. In MySQL triggers we are calling other databases and as they are in a same server it works.
  2. What we can written in trigger we can write the same in App Server but it's going to be tedious tasks.
  3. I'm not using Aurora so Lambda functions are out of scope for me. So, currently I'm looking for a solution where I can limit the database so even if there were too much db load it should not bring down all the databases.

AWS RDS MySQL5.7

Thank you in advance.

2
  • MySQL "databases" are simply schemas, that is, logical namespaces within the same MySQL instance; when the instance abends, no databases can be available.
    – mustaccio
    Aug 12, 2022 at 17:38
  • Elaborate on "load" and "stop" in "load in 1 database it stops all the databases".
    – Rick James
    Aug 12, 2022 at 21:17

1 Answer 1

0

You may be able to set resource limits for your MySQL user accounts. Read https://dev.mysql.com/doc/refman/5.7/en/user-resources.html for the options available. The disadvantage is that after putting resource limits on the accounts, your database may not be able to serve the incoming requests.

You haven't described anything specific about what your trigger code is doing, so there's no way to suggest an optimization strategy.

You're right that usually, running more code in the app server is more scalable than putting it in the database server in triggers or procedures. I understand this is a lot of work to recode it, but that may be your best strategy.

That leaves the solution of upgrading to a more powerful instance size for your RDS instance. You also haven't said what instance type or size you currently use, so this is also a guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.