SharkBait Posted February 6, 2007 Share Posted February 6, 2007 Hi, Looking for advice when it comes to connections with MySQL. Currently I go the easy way and use mysql_connect() but I noticed that one of my windows apps has an issue with closing connections and I kept getting error about there were no connections available. Now I can look through the code and fix that, but is it better to use persistant connections? I have more web based apps that use MySQL and is it more efficient to to use mysql_pconnect() and leave the connection open? Currently all my scripts call mysql_connect() at the top and mysql_close() at the bottom. I have 3 databases that multiple sites and 3 winapps use to read/write data too. I could change the my.cnf file to allow more connections but that's more of a bandaid fix isnt it? My web queries are all under 0.5 secs when executed. The server is a dual xeon setup running on a gigabit backbone (all web apps and win aps are run within our network). So yea, just looking on advice. Yes I'll be fixing that winApp that doesn't seem to properly close its MySQL Connections Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.