I maintain a website for someone who has a large e-commerce shop that is growing year-on-year. The problem is, this Christams I fear it has become a victim of it's own success as we keep seeing the dreaded "SQLSTATE  Too many connections" error, though if only intermittently.
I have made sure all open connections are closed properly so there are no 'hanging' connections, however the error still randomly appears. I have contacted the host (1&1) to get them to increase the MySQL max_connections variable (currently set at 240) who say they cannot do this because we are on a shared hosting package. So my question is, is there anything I can do other than move the site to a dedicated server (which would be triple the current hosting cost)? Would a virtual server or cloud hosting do the job? Or is there some coding tricks I can use to help alleviate the problem? Sorry for the newbie questions.