Hi,
Currently I am writing a php page (let's call it content page) that will auto-refresh itself every 20 secs. The page will connect to database, retrieve a list of records.
Previously I put mysql_connect straight in each of the page (admin section, change password and other pages that require some db interaction). Then I got around near 200 users viewing the content page for around 10 hours everyday. After that errors start popping out --> Too many connection to mysql.
Then I put mysql_free_result and mysql_close at the end of each page. But it didn't solve the problem. So from here I am puzzled whether mysql_close is any useful or not.
I would like some suggestion on this case. Is there a way to reduce connection in this sense? Please advice me. Thanks. 🙂