pafranklin Posted April 6, 2008 Share Posted April 6, 2008 Hi there, sorry for yet another support request, but I have a problem when using both the admin and customer areas of the site. My host has a limit of 90 concurrent database connections and for some reason just a few clicks around the admin and customer areas seems to generate more than this number (which means I get automatically blocked from the server for two hours). I have used a program called cPorts to monitor this and confirm that four clicks seem to generate a large volume of separate connections which is causing the problem. I have absolutely no idea what is going wrong here and would be VERY grateful for some help please???? Thank you. Paul You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
♥FWR Media Posted April 8, 2008 Share Posted April 8, 2008 Hi there, sorry for yet another support request, but I have a problem when using both the admin and customer areas of the site. My host has a limit of 90 concurrent database connections and for some reason just a few clicks around the admin and customer areas seems to generate more than this number (which means I get automatically blocked from the server for two hours). I have used a program called cPorts to monitor this and confirm that four clicks seem to generate a large volume of separate connections which is causing the problem. I have absolutely no idea what is going wrong here and would be VERY grateful for some help please???? Thank you. Paul Do you have define('USE_PCONNECT', 'true'); In both configure.php? Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2008 Share Posted April 8, 2008 also usually a host problem on a shared server Link to comment Share on other sites More sharing options...
pafranklin Posted April 8, 2008 Author Share Posted April 8, 2008 Do you have define('USE_PCONNECT', 'true'); In both configure.php? Hi and thanks for the reply. My two configure.php files have define('USE_PCONNECT', 'false'); Is this correct or should I change to True? Many thanks Paul. You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
♥FWR Media Posted April 9, 2008 Share Posted April 9, 2008 Hi and thanks for the reply. My two configure.php files have define('USE_PCONNECT', 'false'); Is this correct or should I change to True? Many thanks Paul. No it should be false. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2008 Share Posted April 9, 2008 installed any contributions lately, or made other code changes? -jared Link to comment Share on other sites More sharing options...
pafranklin Posted April 9, 2008 Author Share Posted April 9, 2008 installed any contributions lately, or made other code changes? -jared No, Nothing installed particularly recently. I have read up a lot about persistent connections and wonder what would be the imact of changing to "true" in the configure.php files to set up a persistent Mysql connection on my shared host? Other than that I am at a loss. The trouble is if I start to print orders, add a cuple or products and do any basic work, the volume of connections grows to in excess of 90 quickly and I get blocked from access for two hours. Help........... :-( You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 In between pulling your hair out and looking for a decent host if you find the time at the end of footer.php add mysql_close(); Link to comment Share on other sites More sharing options...
pafranklin Posted April 10, 2008 Author Share Posted April 10, 2008 In between pulling your hair out and looking for a decent host if you find the time at the end of footer.php add mysql_close(); Hi and thank you for taking the time and trouble to reply. It is much appreciated. I needed to change this to <?php mysql_close(); ?> at the end of my footer.php page. Unfortunately it did not make any difference. Opening my index.php page generated 29 database connections and just two page refreshes made this figure jump to 45 seperate database connections. Now hairless and dreading the thought of having to move host (after only moving to these three months ago). I simply do not know what else to try, but thank you for trying to help! Best regards. Paul You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
♥FWR Media Posted April 11, 2008 Share Posted April 11, 2008 Not sure if it'll work in your particular .htaccess but try .. php_value mysql.connect_timeout 20 Reducing this from the default 60 secs may prevent sleeping threads accumulating. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
pafranklin Posted April 11, 2008 Author Share Posted April 11, 2008 Not sure if it'll work in your particular .htaccess but try .. php_value mysql.connect_timeout 20 Reducing this from the default 60 secs may prevent sleeping threads accumulating. Thank you yet again (I seem to be saying that a lot lately)!! Sorry for being a little simple but should this go in the .htaccess file or in the footer.php as before? Many thanks. Paul You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
♥FWR Media Posted April 11, 2008 Share Posted April 11, 2008 Thank you yet again (I seem to be saying that a lot lately)!! Sorry for being a little simple but should this go in the .htaccess file or in the footer.php as before? Many thanks. Paul catalog/.htaccess Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2008 Share Posted April 11, 2008 a lot of this is also a host problem, on their shared servers. Link to comment Share on other sites More sharing options...
♥FWR Media Posted April 11, 2008 Share Posted April 11, 2008 a lot of this is also a host problem, on their shared servers. Yeah, I'm pretty sure its virtually ALL related to a host problem and a badly resourced shared server. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Goldeneye512 Posted May 31, 2008 Share Posted May 31, 2008 Robert. Did you ever find a solution to this? Regards, Heath. Experienced in MySQL and PHP. I am always willing to help if you require a quick answer but please note that any work I do for you has to be charged for and pre-paid via PayPal. Sorry but I spend so much time helping others that I have less time for my own business. Please only ask for my assistance if you are willing to pay for my time. Link to comment Share on other sites More sharing options...
iecwillow Posted December 2, 2008 Share Posted December 2, 2008 That's exactly same problem I'm having now, but I'm on a dedicated Pentium® 4w/HT - 3.0GHz with Linux: Red Hat server. A couple clicks can brought 30 - 50 connections. Anyone please share a solution? Link to comment Share on other sites More sharing options...
mglew Posted April 27, 2009 Share Posted April 27, 2009 I have the same problem hosting on NetRegistry through hostess.com.au - they keep pointing to a programming problem on my end, but most PHP references indicate that if you mysql_open() without a new link, it should reuse existing links (if any, by default) and at the end of the php, it should close the link automatically - so this looks like a problem with the hosting's garbage collection... Regardless I've added mysql_close() to the application_bottom.php but can't test it until the DB is bounced. I'm now offline for 19 hours, and I'm not a happy camper... MikeG www.bestexhaust.com.au Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.