Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Joomla Virtuemart Template - DarkMart (SKU# FLEX-00011)

TOPIC: Many database queries

Many database queries 10 years 2 months ago #8095

I'm facing the fact that 2 of my websites are limited by the hostingprovider. Both websites are on a shared server, use Virtuemart and the DarkMart template.

Website A is only used as a catalogue, has about 800 visitors a month and about 130 Virtuemart products. So not a heavy duty site to my opinion but is dealing with a Virtual Memory Usage problem, see attachment

Attachment cpu-websiteA.jpg not found

and is limited for that reason.

Website B has about 3000 visitors a month and contains about 1000 Virtuemart articles with subarticles, custom fields, stockinventory and cartfunctionality. The attachement

Attachment cpu-websiteB.jpg not found

shows the server behaviour of this website during the last 7 days. Yesterday I've moved this website to another shared server to see how it goes there.

Anyway, doing some other investigations about the problems with both websites I Activited the debugging option in Joomla in website B and noticed the enormous amount of database queries: about 1300 for the Virtuemart homepage and over 2000 for a category page! Too many db queries slows down the website.
I think this overkill of db queries has been frustrating the CPU's server a lot and that's why the site has been limited by the hostingprovider and has become more slow.
Selecting another template reduces the amount of database queries dramatically and I have other Virtuemart websites on this same shared server without any CPU problems, so after eliminating a few things I think maybe the template is causing the problems I'm facing at the moment.

Why is the template generating so many database queries?
The administrator has disabled public write access.

Many database queries 10 years 2 months ago #8100

If you had VPS or Dedicated server, i would recommend you some server-side tweaks to reduce the load. But you are saying; you are on shared hosting so there is not much thing you can do on the server side. Literally you are limited what your hosting providers offer you.

But keep this in mind; DB queries can't cause the CPU load on the server, not that much at least. And 1.3k is not very high. Beside; the quantity is not really important. 100 fast db queries can be faster than 1 slow db query. So, you can't compare them by looking at the quantity. DarkMart doesn't run that many DB queries at all (comparing to other 3rd party premium Joomla Templates)

Did you try to enable the "cache"? By enabling cache; you will drop the DB Queries to ZERO (within the "cache time"), try it and see if there will be any performance improvement on CPU.

Instead of moving your website from one place to another, try to enable the "cache". Or get a 3rd party cache plugins for more advanced features. (there are free available on the web). There are some server-side cache plugins, like memcache or XCache etc.. but you are on shared hosting, you are not allowed to enable/install any of them .

Additionally, request a detailed report from your hosting provider about why your website gets limited. If they simply say "your website causes overload", this is not enough. Ask for more information and request the details. Sometimes websites get compromised and this cause overload too. This might be the case.

Regards,
Support
Last Edit: 10 years 2 months ago by Support.
The administrator has disabled public write access.

Many database queries 10 years 2 months ago #8116

Hi, thanks for you reply.
For your info: progressive cache en gzip is on and I'm using jch optimize. Page Speed is 92% YSlow=83%. Could always be better, but not bad results.
The new hostingprovider is now doing some stresstests to see how everything is going.
Both websites are completely new and up-to-date. I don't think they are compromised.
This is all te information I have. Hopefully the new hostingprovider comes with more detailed reports.
The administrator has disabled public write access.

Many database queries 10 years 2 months ago #8132

JCH cache plugin is better than the joomla built-in cache. So it is a good thing and it should minimize the DB connection and PHP processing (minimize them to zero) . GZIP is only useful to increase the page loading performance, it can't have any effect on CPU load.

Usually VPS, with minim 512mb dedicated RAM is the best option to run an eCommerce (Joomla+Virtuemart) websites, regardless how many pages you have, or how many products you have.

Shared hostings are for amateurs and for the HTML plain websites only. Running a PHP based complex system (joomla, wordpress etc..) website on a shared hosting (which does lots of database connection and PHP processing) doesn't make any sense. Soon or later it will cause overload at some point. Either now or when your pageViews reached up to 1.000/day. Even a plain joomla website will have some trouble when the pageView reaches to 1000-3000 daily on shared hostings. This something you can't avoid. It will happen.

(Shared hostings are as cheap as $2/month these days, which proves how weak they can be)

I would highly suggest you to switch to VPS. VPS servers are usually around $20-$40/month and will let you host couple complex websites at the same time without any overload issue.

I would recommend you inmotionhosting.com: www.inmotionhosting.com/vps-hosting
I have also heard Bluehost.com and Dreamhost.com are good too. There are others as well. Make research about it and read the customer reviews.

Regards.
Support
Last Edit: 10 years 2 months ago by Support.
The administrator has disabled public write access.
Time to create page: 0.076 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo