Q:

How does ruby on rails free database resources and close connections?

I have never worked with ruby on rails when I was thinking about error handling, I thought about freeing database resources and closing connections, I was investigating about this, but I didn't find a lot of information, then my questions are: How does ruby on rails free database resources and close connections? Do we have to do this task or ruby on rails does it for us? If we have to do this task, what's the correct process? If it's possible, share some links about this please.
Thanks for your help.

A:

Rails has a connection pool, which size you can configure in your config/database.yml. You do not have to cleanup connections yourself.
Read more about the ConnectionPool in the Rails docs

