nspinheiro Posted February 27, 2015 Share Posted February 27, 2015 (edited) 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. Edited February 27, 2015 by nspinheiro (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted February 27, 2015 Share Posted February 27, 2015 (edited) 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 February 27, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted February 27, 2015 Share Posted February 27, 2015 (edited) 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 February 27, 2015 by selectshop.at (see edit history) 1 Link to comment Share on other sites More sharing options...
JPresta.com Posted February 27, 2015 Share Posted February 27, 2015 I think this one is important: "The host expert.com.pt should enable Keep-Alive." Timeline seems to suffer of "blocking" resources 1 Link to comment Share on other sites More sharing options...
nspinheiro Posted February 28, 2015 Author Share Posted February 28, 2015 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 More sharing options...
tuk66 Posted February 28, 2015 Share Posted February 28, 2015 (edited) 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 February 28, 2015 by tuk66 (see edit history) 1 Link to comment Share on other sites More sharing options...
Dh42 Posted March 2, 2015 Share Posted March 2, 2015 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 More sharing options...
nspinheiro Posted March 2, 2015 Author Share Posted March 2, 2015 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 More sharing options...
nspinheiro Posted March 2, 2015 Author Share Posted March 2, 2015 YSlow shows overal Grade C on the home page. Here are some notes: I can see that, but i have no idea how to solve. i need to understand what kind of professional i need to look for to do it Link to comment Share on other sites More sharing options...
Dh42 Posted March 2, 2015 Share Posted March 2, 2015 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 More sharing options...
nspinheiro Posted March 5, 2015 Author Share Posted March 5, 2015 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 More sharing options...
nspinheiro Posted March 5, 2015 Author Share Posted March 5, 2015 Some print screens Link to comment Share on other sites More sharing options...
Daniel - PrestaBR Posted March 6, 2015 Share Posted March 6, 2015 If you're using some kind of cache Application (APC, xCache, Memcache), try disabling it. A bad-configured cache system is worse than no cache. 1 Link to comment Share on other sites More sharing options...
nspinheiro Posted March 6, 2015 Author Share Posted March 6, 2015 Indeed... To check if it was a cache issue i was adviced to try out cloudflare and it seemed to work... Link to comment Share on other sites More sharing options...
nspinheiro Posted March 12, 2015 Author Share Posted March 12, 2015 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 More sharing options...
moy2010 Posted March 12, 2015 Share Posted March 12, 2015 It's still a server performance issue.You should contact Dh42 and hire him to help you to solve your prestashop performance issues. Link to comment Share on other sites More sharing options...
nspinheiro Posted March 12, 2015 Author Share Posted March 12, 2015 Just sent a message Link to comment Share on other sites More sharing options...
Dh42 Posted March 12, 2015 Share Posted March 12, 2015 What happens when you disable the products on the front page? Does the shop speed up much? Link to comment Share on other sites More sharing options...
nspinheiro Posted March 12, 2015 Author Share Posted March 12, 2015 What you mean? you want me to disable all products? If i do that on business hours someone will fire me if i do it outside business hours the traffic is very low. I am a B2B. i've sent you a PM Link to comment Share on other sites More sharing options...
selectshop.at Posted March 12, 2015 Share Posted March 12, 2015 (edited) 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 March 12, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
Daniel - PrestaBR Posted March 13, 2015 Share Posted March 13, 2015 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 More sharing options...
nspinheiro Posted March 13, 2015 Author Share Posted March 13, 2015 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 More sharing options...
selectshop.at Posted March 13, 2015 Share Posted March 13, 2015 (edited) 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 March 13, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
nspinheiro Posted March 15, 2015 Author Share Posted March 15, 2015 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 More sharing options...
nspinheiro Posted March 17, 2015 Author Share Posted March 17, 2015 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 More sharing options...
selectshop.at Posted March 18, 2015 Share Posted March 18, 2015 (edited) 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 March 18, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
nspinheiro Posted March 18, 2015 Author Share Posted March 18, 2015 Í think it is solved Moved the site to a new hosting provider and that was it.... www.amen.pt never again! Link to comment Share on other sites More sharing options...
nspinheiro Posted March 18, 2015 Author Share Posted March 18, 2015 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? Link to comment Share on other sites More sharing options...
selectshop.at Posted March 19, 2015 Share Posted March 19, 2015 (edited) 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 March 19, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
nspinheiro Posted March 20, 2015 Author Share Posted March 20, 2015 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 More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 Thank you for your answer. I was imagine something about this. Although you have the possibility to configure the search weights, I always ask my customers to don't make any changes there, cause it can have heavy impact on the search Link to comment Share on other sites More sharing options...
Recommended Posts