Jump to content

1.5.4 Slowness - a Possible Solution


Recommended Posts

This easy fix worked for me. Turn off minify javascript and minify html. I'm on a VPS, so YMMV.

 

I have the same site on two different versions of Prestashop: The old one on 1.4.10 and the new one I'm building in a subdirectory on 1.5.4. The product in question is a belt that comes in roughly 20 different leathers and 20 different sizes. Over 400 different "product choices" when you click the thumbnail to get to the product page.

 

On the 1.4.10 site, the page loads in about a second. On the 1.5.4 page it took 8 seconds. Thinking it was MySQL-related, I talked to a tech in vps support at hostgator. He said that the 8 second load page was eating up 100% of one of my CPU cores (2.69 Ghz) and it was happening in the jsminify section of /tools. His thought was that it's taking all that time and cpu power to minify the javascript. Once it's all minified, the page loads instantly in full. So I turned off the js minify and the new site was instantly faster.

 

In case anyone on a vps or otherwise wants to try that, it worked for me. Once I get the new site built I plan to run all the javascript off cloudcache, so I'd be turning off the js minify anyway.

Link to comment
Share on other sites

In Advanced Parameters / Performance I turned it off in the CCC area. Normally for faster performance you leave it on. Maybe it's my VPS with limited cpu, but my products with a lot of attributes/values are much faster now.

 

My settings

ccc.jpg

Link to comment
Share on other sites

I would check if your cache directories are writable. I just tested it. In every theme directory you have one which is called cache and the minified css and js files are stored there. So they are created ones which takes cpu time but after that they are served as static files and therefore should not consume more cpu than serving a static html file. It might be that you have wrong directory permissions and therefore the cached files can not be saved und PS tries to recreate them over and over again? I would recommend look into the cache directories to see of the minified files are created and if they are, look if the creation dates change after reload the pages.

Best regards, trip

Edited by Trip (see edit history)
Link to comment
Share on other sites

What you say certainly makes sense. I checked and my cache directory was set at 755. I temporarily set it to 777, turned all the CCC settings back to cache performance and tried it. The pages with the 20 sizes and 20 colors went back to 8 second loads. When I re-checked the permissions, the cache directory had "set itself" back to 755. But that should work anyway. I had a number of cache files in there with today's date. Scratching my head, "why aren't the pages loading from cache?".

 

It shouldn't be a MySQL problem because the original site built on PS 1.4.10 has many pages with belts containing 20 size choices, 20 color choices and inventory of 10 belts per choice, something like 4000 "products" and those pages load in a second. But, that site is serving content from Cloudcache, so all the CCC settings are on "keep as original".

 

I'm keeping most of my sites on PS 1.4.10, but I just wanted to try this one on the 1.5 series with a "new look".

 

Thanks for your input!

Link to comment
Share on other sites

Hi Rturner,

just to be sure. Did you look in the themes directory or in the normal cache dir?

It the themes directory there should be something like a hash_value._all.css and hash_value.js

1) You can look in the html source if they are included correct.

2) When you look at the file dates you can see when they were last modified. I mean it is always possilbe that there is

a bug but it would be interesting to find and iron it out as I can not connect you observations together that they make sense. My load times are ok but I do not use combinations. In general the CCC options dramatically reduce the number of connections made to the server and therefore boost performance on the user site. Did you test it with the default theme and you mabe could use debug profiling in condig/defines.inc.php to get more insights on what hooks are maybe slow.

All the best, trip

Link to comment
Share on other sites

Hi Trip,

Yes, I looked at the cache directory in the theme I'm using. After I reinstated all of the CCC options I found one hash_value.js file for today. Comparing it with the source generally compared exactly, however I may have found a direction for the cpu increase. About a week ago (hmmm, when I upgraded to 1.5.4.1?), Thickbox stopped working, I couldn't click on images to get the full image into a popup. On any browser. So I turned that off and enabled JqZoom. I notice in the source that the javascript for thickbox is still listed. So I'm thinking that a corrupted thickbox script trying to call itself may be eating up cpu. But the question remains, why are only my products with all the attributes loading slow and hitting the cpu? All the products have images.

 

So, my next step, when I get a chance, is to run debugging. I could also find the directory in which thickbox lies and replace it with a fresh directory from a download.

 

I tried changing to the default theme and the slowness was exactly the same. I also shut off most but not all of the modules to rule out a resource hog. So once I do some more debugging I'll post my findings.

 

thanks for your ideas.

Richard

Link to comment
Share on other sites

  • 1 month later...

Hi there

 

I have exactly the same problem.

With v1.4.8 : no problem.

Each page takes less than 1 seconds.

 

 

With v1.5.4 : one page takes about 25 seconds.

And i i add more product, i get one fatal error :

 

Fatal error: Maximum execution time of 30 seconds exceeded in G:\wamp\www\website\classes\db\DbPDO.php on line 80

 

I have made some test in local, and with my dedicated server. It is the same.

It is impossible to use attributes options with v1.5.4 !

When I deactivate this option, everything works perfectly.

Link to comment
Share on other sites

  • 3 months later...

Hi there

 

I have exactly the same problem.

With v1.4.8 : no problem.

Each page takes less than 1 seconds.

 

 

With v1.5.4 : one page takes about 25 seconds.

And i i add more product, i get one fatal error :

 

Fatal error: Maximum execution time of 30 seconds exceeded in G:\wamp\www\website\classes\db\DbPDO.php on line 80
I have made some test in local, and with my dedicated server. It is the same.

It is impossible to use attributes options with v1.5.4 !

When I deactivate this option, everything works perfectly.

 

 

Hi, Kevin78

 

What do you mean by "deactivate this option"? Which option is it?

 

I have the same problem and I don't know how to fix it...

First of all, I thought that this was related to "zend_mm_heap corrputed" I found on apache error.log, but it seems to be something else...

 

I already posted something here:

 - http://www.prestashop.com/forums/topic/275337-segmentation-fault-and-zend-mm-heap-corrupted-errors/?do=findComment&comment=1400933

 

If you have any suggestion, I would appreciate!

 

Many thanks,

 

Hideo

Link to comment
Share on other sites

  • 2 years later...

Hi Somit,

If you are on a dedicated server, you can check your php.ini and change the value of max_execution_time, which should be in your case, set at 60.
If not, you can add this in your index.php: ini_set('max_execution_time', 300);
or in your .htaccess: php_value max_execution_time 30.

Here's more informations about "max_execution_time": http://us2.php.net/manual/en/info.configuration.php#ini.max-execution-time

Hideo

Link to comment
Share on other sites

×
×
  • Create New...