I am having problems with the MySQL Database connection with PHP. The database keeps crashing once a week and it produces a "Too Many connections error". The technical support at the hosting company told me to change the way I connected to the database. I currently use the function mysql_connect() to connect to the database and I never really close it out, which I assume the connection closes when the script ends. Should I use mysql_pconnect instead? and if I do, will it cause any other kinds of problems? PLease help! Thank you
pconnect: memory hog connect: CPU hog
figure out your machine specs and choose accordingly.
if you do use connect, always do the mysql_close at the end of the script anyways just to be safe, because obviously there is a problem.