I'm in dire need of help here. I received the following error msg when accessing my site (opencart 1.4.7):
Warning: mysql_connect() [function.mysql-connect]: User xxxxx already has more than 'max_user_connections' active connections in /home2/xxxx/public_html/system/database/mysql.php on line 6
Error: Could not make a database connection using xxxx@localhost
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home2/xxxx/public_html/system/database/mysql.php on line 66
Contacted my web hosting and they say my site is exceeding the maximum number of mysql connections which is 15 and that my site has to be optimized so that it does not try to open more than 15. He says I can probably reduce it by implementing some server-side caching for your site.
With no programming background whatsoever, can anyone advise how I can do that? Or what would be the best solution to this problem? Change to a better hosting? Hire a developer to look into it? It's peak season now and with this problem, I'm losing a lot of customers with intermittent downtime recorded yesterday for several hours combined using an uptime monitor service. PLEASE HELP! Urgent! Thank you!!
It could be that you modfied your template or core code and hat there is a sort of loop that connects to you MySQL and uses up all your MySQL connections.Always include a link if you are having a store front issue!
Without a link to your site no-one can tell.
You can also ask your hoster to have a look at it.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
This would mean you need to upgrade your hosting-plan.doremi wrote:I guess it happens when the traffic is high, as pointed out by my hoster.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 522734017 bytes) in /home2/*****/public_html/admin/controller/tool/error_log.php on line 43
Also, when I try to backup the database (during the time my website is loading without problem), it takes a very long time, and causing the website to load very slowly. Is this normal?
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Can you please advise how i can configure to allow bigger memory allocation for the error log? If it's true like Xsecrets pointed out, perhaps I can find the source of the problem from the log. Thank you.JAY6390 wrote:it's because the error log is so big. Delete it (or get your php config to allow a bigger memory allocation)
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
@xsecrets - A VPS really isn't all that more expensive than shared hosting, and allows you far more freedom - for the 1000 hits, if it's 1000 unique visitors (which is what I was assuming) then it's really not all that unlikely that a server would go over 15 users at once, and there are obviously times in the day where traffic is "bunched together" as it were, during peak times
PHP Notice: Undefined variable: action in /home2/*****/public_html/catalog/view/theme/default/template/product/category.tpl on line 67
This is the line where I pasted the code to add "add to cart" and "View Options" button on catalog product list found here http://forum.opencart.com/viewtopic.php ... 97&p=63356 with this code
Code: Select all
<?php if (!$products[$j]['options']) { ?>
<form action="<?php echo $action; ?>" method="post" id="product_<?php echo $j;?>">
<input type="hidden" name="quantity" size="3" value="1" />
<a onclick="" id="add_to_cart_<?php echo $j;?>" rel="<?php echo $j;?>" class="button add_to_cart"><span>Add to Cart</span></a>
<input type="hidden" name="product_id" value="<?php echo $products[$j]['id']; ?>" />
</form>
<?php }
else { ?>
<a class="button" style="text-decoration:none;" href="<?php echo $products[$j]['href']; ?>"><span>View Options</span></a>
<?php } ?>
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Users browsing this forum: No registered users and 16 guests