How to reconnect to the database?

I have a rails app that uses a background process. Every now and then,
for a reason beyond me, it will say “Product id=7 not found”. When the
product is in the DB. So What I’d like to do is catch that exception and
then reconnect to the database. Hwo do I do this? I saw a reconnect!
method, but I have no idea which object to run that on how how to
actually use it.

Here is where I saw it:

Do I just do Product.reconnect!, ha ha. I know that’s not right, but how
do I use that reconnect! method?

Thanks for your help.