"My current hosting provider suggested that I close the link immediately after using because their max_user_connections is currently set to 25. "
"and they further mentioned that a shared hosting site should not need more than 25 simultaneous database connections"
25? lol I wonder how they came to that completely ridiculous conclusion. I hope you are not paying them much.
The explenation:
PHP is run by the webserver.
The webserver is multithreaded. That means, it can start up X copies of itself, and so it will start X copies of PHP.
Each copy of the webserver requires it's own database connection. So if your host let's you start 50 webserver threads (which is complete peanuts) they must allow you to use at least 50 concurrent database connections.
The 25 limit is complete nonsense.
MySQL already defaults to 100, and I prefer to set it at 250 at least.
My advice: either get them to increase the limit, or change hosts immediately.
25.... lol...