Jump to content

Prestashop bad Performance Issues - Really could use some help please...


Recommended Posts

Hello

 

I am getting desperate with my PS 1.6.0.9 (expert.com.pt) hosted on a VPS with 2 vCPU and 4Gb of Ram.

 

Although sometimes it is ok (never very fast) i have times that it hangs and stops, taking about 10 to 20s to load a page, or more, specially in working hours.

 

I have no more than 35 clients at the same time and all crons are set for off work schedules. I've removed layered navigation and bought Advanced Search 4.

 

I am using cache, with all CCC options enabled, Rijndael Algoritm and APC

 

In attachment you can see some Print screens of tests made in the server while it is very slow. I am trying to at least identify the origin of the problem and hire a professional of that subject to solve it, but has is it's a shot in the dark.

 

 

 

 

post-400164-0-40038600-1425046120_thumb.png

post-400164-0-83400900-1425046168_thumb.png

post-400164-0-71753400-1425046265_thumb.png

post-400164-0-68326000-1425046275_thumb.png

post-400164-0-66526800-1425046297_thumb.png

post-400164-0-45465500-1425046332_thumb.png

post-400164-0-30228900-1425046552_thumb.png

post-400164-0-23745500-1425046723_thumb.png

post-400164-0-32049200-1425046730_thumb.png

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

It is a server problem. You you should enable compression (gzip and keep alive). On your back office you enabled CCC but this is not making any effect, cause your server does not support.

 

Please see speed page test and result for to debug

 

http://gtmetrix.com/reports/expert.com.pt/TrvnKE0d

http://www.webpagetest.org/result/150227_53_R42/

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Furthermore you should compress your pictures. Download the folder /img to your local machine, use a compressing tool like "Casesium" and upload your compressed folder /img again to your FTP.

 

Caesium settings: Load folder /img.

Format: Input

Output Folder: keep Structure, Same Folder as input, Sufix: . Don't add a suffix in order that pictures are overwritten and you can back them up to your server 1:1, but compressed

 

BTW: When you have JS disabled, you are not able to uncheck you modal FB pop-up. Please consider that several mobile devices don't have JS plug-ins installed and you will not able to visit your site, cause you cannot shut the screen.

Edited by selectshop.at (see edit history)
  • Like 1
Link to comment
Share on other sites

Hello

 

Thank you all for yor replies and help. I've managed to setup Gzip and Keep-Alive, and on GTmetrix i am already on Grade A. 

 

I am missing the pics that i still have to do, try to do today

 

I also get on GT Metrix a bad grade in "Defer parsing of JavaScript" i have no idea what that is.

 

I still find the store to be slow... Do yslow values fix make a big diference? most of them i cannot understand what they are

Link to comment
Share on other sites

YSlow shows overal Grade C on the home page. Here are some notes:

 

Grade F on Make fewer HTTP requests

This page has 55 external Javascript scripts. Try combining them into one.
This page has 3 external stylesheets. Try combining them into one.
This page has 8 external background images. Try combining them with CSS sprites.

 

Grade F on Use a Content Delivery Network (CDN)

There are 83 static components that are not on CDN.

You can specify CDN hostnames in your preferences. See YSlow FAQ for details.


  • expert.com.pt: 78 components, 1526.5K (294.8K GZip)
  • fonts.googleapis.com: 1 component, 0.5K (0.2K GZip)
  • connect.facebook.net: 1 component, 161.9K (52.5K GZip)
  • oauth.googleusercontent.com: 1 component, 68.1K (22.6K GZip)
  • ssl.gstatic.com: 2 components, 20.4K (8.2K GZip)

Grade E on Reduce DNS lookups

The components are split over more than 4 domains

  • expert.com.pt: 80 components, 1631.7K (311.6K GZip)
  • fonts.gstatic.com: 3 components, 120.7K
  • fonts.googleapis.com: 1 component, 0.5K (0.2K GZip)
  • apis.google.com: 4 components, 283.8K (98.8K GZip)
  • www.google-analytics.com: 2 components, 27.5K (12.1K GZip)
  • connect.facebook.net: 1 component, 161.9K (52.5K GZip)
  • static.ak.facebook.com: 1 component, 28.2K (9.9K GZip)
  • s-static.ak.facebook.com: 1 component, 28.3K (10.0K GZip)
  • www.facebook.com: 2 components, 36.7K (12.2K GZip)
  • fbstatic-a.akamaihd.net: 1 component, 234.9K
  • fbcdn-profile-a.akamaihd.net: 15 components, 26.3K
  • accounts.google.com: 2 components, 1.7K (0.5K GZip)
  • oauth.googleusercontent.com: 1 component, 68.1K (22.6K GZip)
  • ssl.gstatic.com: 2 components, 20.4K (8.2K GZip)

Grade C on Reduce the number of DOM elements

There are 1400 DOM elements on the page

A complex page means more bytes to download, and it also means slower DOM access in JavaScript. Reduce the number of DOM elements on the page to improve performance.

Edited by tuk66 (see edit history)
  • Like 1
Link to comment
Share on other sites

There is a big issue with 1.6 not caching that no one has really done anything about. The block specials, and the best sellers hit the database really hard on every page load because they are not caching results. If you are running them, disable them and see if things speed up. We have a couple modified versions we use with some of our clients that hook them to a cron job so they are only updated once a day. 

 

Also since you are using APC, make sure you are using the correct number of workers for your server and that your memory settings are correct. If not, you will start swapping memory to disk and it will defeat the whole purpose of using APC and make the site slower.

 

 

Edit: Since you are using 1.6.0.9 make sure you have applied the cache_index bug fix as well, this can have a pretty bad effect on performance too.

Link to comment
Share on other sites

There is a big issue with 1.6 not caching that no one has really done anything about. The block specials, and the best sellers hit the database really hard on every page load because they are not caching results. If you are running them, disable them and see if things speed up. We have a couple modified versions we use with some of our clients that hook them to a cron job so they are only updated once a day. 

 

Also since you are using APC, make sure you are using the correct number of workers for your server and that your memory settings are correct. If not, you will start swapping memory to disk and it will defeat the whole purpose of using APC and make the site slower.

 

 

Edit: Since you are using 1.6.0.9 make sure you have applied the cache_index bug fix as well, this can have a pretty bad effect on performance too.

 

Thanks for your feedback. I Have some questions

 

1. Is it safe to say that i only have the specials and best sellers on main page, the other pages are not afected?

 

2. What is the correct number of workers? is this configurable on the server? how can i know the good values for my case?

 

3. cache index bug fix is a knowed bug that i need to correct? i did not do anything regarding that yet

Link to comment
Share on other sites

The cache index issue is addressed here https://www.prestashop.com/forums/topic/351806-sticky-1609-solved-bugs/

 

For the workers, it totally depends on the memory of your server and things of that nature, you don't want to over extend the memory, or allocate more than you actually have.

 

Depending on how the theme is written they can or cannot cause performance issues on the site on other pages. Also, you might try to disable the new products tab on the home page and see if things get any better.

 

As far as using things like yslow and pagespeed, they really do not help in this case. They do not measure load time, they measure how optimized the site is. You can have a page that scores an A and it still takes 30 seconds to load. Or you can have one that scores a C and loads in 2 seconds.

Link to comment
Share on other sites

Hello

 

I've being with very difficult days but today i was able to apply that bug fix, no difference.

 

I Hava US cpu always near 100%, althoug the SY is only 5%

 

I've disabled several modules one at a time to see if it makes any diference, also no with no difference..

 

I have the 1 first byte for opening a page very high, around 12 seconds

 

I think i am missing the way to see the why this is taking so long

Link to comment
Share on other sites

well it worked for a few days but is getting worst and worst. it is like taking a pill but then having a fall back and worse.

 

I keep to have it down, with slow times and having this error now all the time: 

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

 

Any clues?

Link to comment
Share on other sites

well it worked for a few days but is getting worst and worst. it is like taking a pill but then having a fall back and worse.

 

I keep to have it down, with slow times and having this error now all the time: 

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

 

Any clues?

you should look at the MySQL log to see if the server is actually running or if it has crashed/is not ready to accept connections. Disk Capacity is enough, or nearby full ?

 

A lack of memory also can cause the error. Especially when running a control panel (cPanel/Plesk), can exhaust the available memory and cause services to crash.

 

You can check your available memory with:

 

free -m

If you find that you are low on memory you can try enabling a swap file on your hosting, optimize your MySQL configuration, or upgrade to a larger hosting plan.

 

You can check if mysql is running with the following command:

mysqladmin -u root -p status

try changing your permission to mysql folder, perhaps it solves your problem.

sudo chmod -R 755 /var/lib/mysql/
Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

I had many types of performance issues...

 

Most of them are caused by bad configured servers. Do you use a VPS? Do you have root access?

If you're not familiar with web servers, I suggest asking/hiring an expert.

 

Some issues are caused by poorly developed modules. Try desabling some of your non-native modules.

Avoid modules that make many custom SQL queries. A bad query may consume a lot of CPU and slow down your store in many seconds...

 

And keep watching Analytics of your marketing campains, of course...

With hundreds of simultaneous connections, most servers go down.

Link to comment
Share on other sites

 

you should look at the MySQL log to see if the server is actually running or if it has crashed/is not ready to accept connections. Disk Capacity is enough, or nearby full ?

 

A lack of memory also can cause the error. Especially when running a control panel (cPanel/Plesk), can exhaust the available memory and cause services to crash.

 

You can check your available memory with:

 

free -m

If you find that you are low on memory you can try enabling a swap file on your hosting, optimize your MySQL configuration, or upgrade to a larger hosting plan.

 

You can check if mysql is running with the following command:

mysqladmin -u root -p status

try changing your permission to mysql folder, perhaps it solves your problem.

sudo chmod -R 755 /var/lib/mysql/

 

I've hired a person, since DH42 was unable yet to answer. Do you do it?

 

that person was able to identify a broken table so that is fixed and the sql errors do not occur any more.

 

He also configured the server (apache, nginx, etc)

 

Free memory is:

             total       used       free     shared    buffers     cached
Mem:          3823       1664       2158         56        125        221
-/+ buffers/cache:       1318       2505
Swap:         1023        309        714
 
status it asks for a password?
 
And made that command.
 
 
We are now trying to move everything to a new provider to test it if it has something to do with that.
Link to comment
Share on other sites

The most reason for broken database tables, are server time outs when reading/writing on database. If you have broken tables often, than you should look for another server, or configure the one you have correctly if you have root access. The best packages are VPS with root access through shell and load balancer or better a dedicated server, which is more expensive.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

The most reason for broken database tables, are server time outs when reading/writing on database. If you have broken tables often, than you should look for another server, or configure the one you have correctly if you have root access. The best packages are VPS with root access through shell and load balancer or better a dedicated server, which is more expensive.

 

I have a VPS with root access. i just add 2 diferent persons looking at server configurations, last changes made today. Tomorrow we will see the efects

Link to comment
Share on other sites

 

you should look at the MySQL log to see if the server is actually running or if it has crashed/is not ready to accept connections. Disk Capacity is enough, or nearby full ?

 

A lack of memory also can cause the error. Especially when running a control panel (cPanel/Plesk), can exhaust the available memory and cause services to crash.

 

You can check your available memory with:

 

free -m

If you find that you are low on memory you can try enabling a swap file on your hosting, optimize your MySQL configuration, or upgrade to a larger hosting plan.

 

You can check if mysql is running with the following command:

mysqladmin -u root -p status

try changing your permission to mysql folder, perhaps it solves your problem.

sudo chmod -R 755 /var/lib/mysql/

 

I have 3823 total, 1688 free

 

Disk capacity is 40Gb, about 9gb used

 

The mysqladmin -u root -p status command asks for a password, but the root password does not work

 

last one applied, no changes..

 

We've also changed the SQL of the search module, reducing server load from 30 to 3, but the website is still very slow

 

DH45 does not answer my contacts, is there any other knowed professional to do this?

Link to comment
Share on other sites

Which is your problem now ? Database had again crashed tables ? If yes you should change your server. Could it be that the hardware is working inconsistently.

 

Root password for your database is the one you added to DB when installed mySQL. If you don't know it, so try to change it on cPanel or Plesk, or on shel. On the net you will find several good tutorials instructing you how to.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

After moving to a jelastic i have the ability to check resourse usage better and i found out that when making a search in the quick search toolbar i have a huge spike on CPU load.

 

 

First spike before 17.50 was 2 persons searching for "samsung"

 

the one near 18 was 3 persons searching for several brands we have

 

It's way above average.

 

I am no expert, but this can't be normal... right?

post-400164-0-57588400-1426702722_thumb.png

Link to comment
Share on other sites

Search index is in fact a problem. They are working on the speed and there are still some debugging available on github. Which Prestashop version is in use ?

 

http://forge.prestashop.com/browse/PSCSX-5039

http://forge.prestashop.com/browse/PSCSX-5028

 

BUT THIS APPLIES ONLY TO PS 1.6.0.14 version.

 

Did you already reindexed your products on tab "preferences -> search" ? It could be that the index table is broken, or another problem could be misconfiguration of the server.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Search index is in fact a problem. They are working on the speed and there are still some debugging available on github. Which Prestashop version is in use ?

 

http://forge.prestashop.com/browse/PSCSX-5039

http://forge.prestashop.com/browse/PSCSX-5028

 

BUT THIS APPLIES ONLY TO PS 1.6.0.14 version.

 

Did you already reindexed your products on tab "preferences -> search" ? It could be that the index table is broken, or another problem could be misconfiguration of the server.

 

We solve the search removing the "weighs" of the fields. The search for samsung that braked the page now takes 3 seconds.

Link to comment
Share on other sites

×
×
  • Create New...