736Online Posted August 5, 2015 Share Posted August 5, 2015 I have found what I believe to be a pretty major bug in the latest software. And I have been able to duplicate this same issue on both a shared and VPS account. If you go into performance and click the Clear Cache button your website will slow to a crawl of 6-12 seconds with no other changes being made. I have tested this on a fresh install as well as on a test version stocked with stock on default themes and customs...all with the same result. I've also tried several combinations of settings as well as reuploading the cache folder in case the button broke some sort of write permissions and that failed as well. Has anyone else run into a problem with your site suddenly slowing down? This could be your cause as well! 1 Link to comment Share on other sites More sharing options...
736Online Posted August 6, 2015 Author Share Posted August 6, 2015 (edited) -Was not the answer to fix the issue Edited August 18, 2015 by 736Online (see edit history) 1 Link to comment Share on other sites More sharing options...
736Online Posted August 7, 2015 Author Share Posted August 7, 2015 This doesn't seem to be a long term fix, the issue keeps popping back up and never gets back down to the fast speeds. This error is still present on both VPS and shared hosting accounts. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 10, 2015 Share Posted August 10, 2015 I also have experienced this cache-speed issue. I have a powerful VPS hosting, and my fast 2.5 second shop jumped up to 10 seconds! This happened after upgrading from 1.6.0.9 to 1.6.1 using 1-click. Link to comment Share on other sites More sharing options...
736Online Posted August 10, 2015 Author Share Posted August 10, 2015 DId you run updates on your modules after the install? I'm still trying to track down the real root cause. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 10, 2015 Share Posted August 10, 2015 DId you run updates on your modules after the install? I'm still trying to track down the real root cause. No, no module updates. I simply did the 1-click upgrade. After the successful upgrade, I cleared the browser cache to refresh the BO and do some testing. I noticed it was very slow. I then cleared the browser cache, no change, painfully slow. I disabled all non-native modules during the upgrade, and did not enable any after the upgrade. So whatever causes the problem was caused during the upgrade. I also tested on IE, FF and Chrome. And ran tests on Gtmetrix, Pingdom and Webpagetest. The problem on all three was the time to first byte, which was usually in the 8-10 seconds range. After that, the rest of the waterfall was quite fast. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 17, 2015 Share Posted August 17, 2015 I did some more testing after my rollback. When I upgrade the store, before clearing the cache in the BO it runs smooth. As soon as I clear the cache, it gets A LOT slower - like 10 seconds added. Link to comment Share on other sites More sharing options...
yo7hli Posted August 17, 2015 Share Posted August 17, 2015 I can confirm this behaviour. as soon as you clear smarty cache both the BO and FO slows down, in my case from ~200ms TTFB to arround 2 seconds. Seems to break the opcode caching somehow, cant figure out how and why. Link to comment Share on other sites More sharing options...
736Online Posted August 17, 2015 Author Share Posted August 17, 2015 What hosting service are you two using? Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 I can confirm this behaviour. as soon as you clear smarty cache both the BO and FO slows down, in my case from ~200ms TTFB to arround 2 seconds. Seems to break the opcode caching somehow, cant figure out how and why. In my case it's even worse, it drops from 1-2 seconds to 10-15 seconds. And it's always the TTFB that is increased, like it's taking forever to compile and render the page code. I have tried enabling and disabling various performance settings, no noticeable effect, except this: if I disable cache altogether, the site gets faster. It "only" then takes 7-10 seconds to load. I am on a VPS at Myhosting with following configuration: Apache 2.2.27 PHP Version 5.4.31 MySQL Version 5.6.23 Link to comment Share on other sites More sharing options...
yo7hli Posted August 18, 2015 Share Posted August 18, 2015 Also on a decent VPS running debian 8 with Apache 2.4, PHP 5.6. Some other details: First time after finding out this bug i switched to disk caching and it started working almost as before, ~300 ms TTFB. Cleaned cache again, prestashop slowed down, now every caching method seems to have no effect. Then I switched to FPM/fastcgi, disabled caching in prestashop, enabled zend opcache, things started working great, of course, till I cleaned the cache again. Now nothing works no matter what I do. I also noticed that even tho opcache (or any other caching engine for that matter) caches both the code and the vars, all the subsequent requests to the cache are missed. Its time to downgrade I think. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 Its time to downgrade I think. Bellini suggested trying a clean installation on my server to see if the problem persists - and it does! A clean 1.6.1 installation, works super fast, both BO and FO - until I clear the cache. After that, it drops from 1.5 seconds to 10 seconds +. So the problem is not caused by the upgrade itself, it is that the new PS 1.6.1 version seems to have different configuration requirements, and something is conflicting with smarty cache. Link to comment Share on other sites More sharing options...
736Online Posted August 18, 2015 Author Share Posted August 18, 2015 I'm starting to think that it's a mysql issue. I erased everything on my server and did a fresh install using MariaDB instead and now I only have the TTFB increase on the first request, all subsequent request are normal speeds. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 I'm starting to think that it's a mysql issue. I erased everything on my server and did a fresh install using MariaDB instead and now I only have the TTFB increase on the first request, all subsequent request are normal speeds. The whole time I only had the TTFB issue on the first request, all others were fast. In my case the problem is that the first request takes 8-10 seconds to compile. Because this issue happens also on a clean installation, as soon as cache is cleared in BO, I think it's a smarty cache issue, caused by some server requirement that changed in 1.6.1 and that was different in 1.6.0.9 Link to comment Share on other sites More sharing options...
736Online Posted August 18, 2015 Author Share Posted August 18, 2015 To be clear my issue was my website was fast before clicking to clear the cache and then request would increase to up to 10 seconds on TTFB going from page to page, but the other parts of the site like loading images and everything else would be fast. TTFB was always slow no matter what would happen. Now I've switched to and tested on MariaDB and only the very first visit from a single visitor (I'm guessing to rebuild the cache profile or something?..) has a slow TTFB and all other subsequent visits are fast with TTFB under 1 second. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 Now I've switched to and tested on MariaDB and only the very first visit from a single visitor (I'm guessing to rebuild the cache profile or something?..) has a slow TTFB and all other subsequent visits are fast with TTFB under 1 second. Yes, that sounds like cache is now working the way it should. It's logic that the very first visitor will get a slow TTFB, when the page initially compiles, and then everything goes fast. What happens when you clear cache again? Same thing, first visitor slow and then fast? Does anyone from Prestashop on this forum have any input on this? Because I would assume that most people use the default SQL settings, and don't seem to have issues. 1 Link to comment Share on other sites More sharing options...
736Online Posted August 18, 2015 Author Share Posted August 18, 2015 Same thing, I can clear the cache over and over with no issues except the very first visit. I noticed that on their blog post about the launch of the new version that they used MariaDB so I gave it a try and it worked out so far. BUT if I turn on CCC it doubles the TTFB (still staying under 1.5seconds) 1 Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 That seems normal behavior to me, that the first visitor gets a slow reaction. I didn't know about MariaDB and that Prestashop is now using it, but I am going to check if my hosting company can test it, and if that solves my problem, I will make the change too. Did you need to conver the DB or anything? Because right now my tables are all Inno DB, with a few MyISAM tables from older modules (my shop was a 1.4 installation). Do you know if MariaDB also works fine with 1.6.0.9 by any chance? Also, what are the differences between MariaDB and Inno? Link to comment Share on other sites More sharing options...
736Online Posted August 18, 2015 Author Share Posted August 18, 2015 I was able to do an "install in place" and everything just worked. I didn't need to adjust phpmyadmin or anything. I did test with 1.6.0.9 and it worked fine. I think another issue could be the fact that a lot of host have the databases separate from the server itself and that adds to the slowness. I installed the database on the server itself and there's no connection delays. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 What do you mean by install in place? I am unsure how I would go about upgrading my existing Inno DB tables to MariaDB. Regarding the SQL server being separate, that could cost a few milliseconds indeed, but for example on my VPS in 1.6.0.9, the TTFB is usually only one second, and the whole page load time less than 3. With the Page Cache module, it drops to 300ms TTFB and a page load of less than 2 seconds. Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 UPDATE: I just ran the debug tool on my slow PS 1.6.1 cleared cache test site, and noticed that all SQL queries start with "SELECT SQL_NO_CACHE" - desptie cache being enabled. Could that be part of the error? Link to comment Share on other sites More sharing options...
parsifal Posted August 18, 2015 Share Posted August 18, 2015 (edited) Isn't it possible that your finding about the queries is something normal when using the default Performance Options (Filesystem-based cache, instead of MySQL-based)? Unless the queries are different when compared to those in a fresh/before-clearing-the-cache installation... Edited August 18, 2015 by parsifal (see edit history) Link to comment Share on other sites More sharing options...
Mister Denial Posted August 18, 2015 Share Posted August 18, 2015 Isn't it possible that your finding about the queries is something normal when using the default Performance Options (Filesystem-based cache, instead of MySQL-based)? That is very well possible, I am no SQL expert. Just thought I'd point it out as possible cause for the slow queries. Something was changed between 1.6.0.14 and the latest 1.6.1, and that causes the cache clearing function in the BO to completely screw up the performance of the website. It looks like PS is compiling every page on every call, instead of caching them. Like smarty cache is not working at all. Link to comment Share on other sites More sharing options...
garyjj127 Posted August 20, 2015 Share Posted August 20, 2015 I had the exact same problem with clearing the cache. It reduced the load speed to 44 seconds for my home page! I don't know whether this is an exact fix, but I went into the back office and reset all the performance parameters (changed the CCC settings to "no"). I then changed cache from "file system" to MySql, then back again. I now have load speeds back to 6 seconds (slightly slower than before, but better than 44 seconds!). Of course, it could be that the cache recompiling that caused the initial slow speed in the first place? Link to comment Share on other sites More sharing options...
pipo1000 Posted August 23, 2015 Share Posted August 23, 2015 Hi, I have the same. I have found that the ../cache/smarty directory does not fill with files at all. Only the latest modules used is being written in de smarty cache. So it keeps compiling the modules over and over again. It looks like it is clearing out the smarty directory after every compile!!!! HELP! Come on Prestashop, help us out! [root@www smarty]# du -ak4 ./index.php8 ./compile/b7/d2/27/b7d227eb085f2641c9d7634cc0af9e50090feea9.file.javascript.tpl.php12 ./compile/b7/d2/2716 ./compile/b7/d220 ./compile/b74 ./compile/index.php72 ./compile4 ./cache/index.php4 ./cache/blockcmsinfo/1/2/6/1/13/74/54/a9/7454a9ce2cbc350de710cee1329f5a70730a3073.blockcmsinfo.tpl.php8 ./cache/blockcmsinfo/1/2/6/1/13/74/54/a912 ./cache/blockcmsinfo/1/2/6/1/13/74/5416 ./cache/blockcmsinfo/1/2/6/1/13/7420 ./cache/blockcmsinfo/1/2/6/1/1324 ./cache/blockcmsinfo/1/2/6/128 ./cache/blockcmsinfo/1/2/632 ./cache/blockcmsinfo/1/236 ./cache/blockcmsinfo/140 ./cache/blockcmsinfo212 ./cache292 . Link to comment Share on other sites More sharing options...
pipo1000 Posted August 23, 2015 Share Posted August 23, 2015 After some digging in GIT and looking at the smarty code I have found when I change; ../config/smarty.config.inc.php and change SmartyCustom into Smarty suddenly I get cache files again and all feels a lot faster; global $smarty;$smarty = new Smarty();$smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile');$smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); Hope this helps! 1 Link to comment Share on other sites More sharing options...
Mister Denial Posted August 24, 2015 Share Posted August 24, 2015 After some digging in GIT and looking at the smarty code I have found when I change; ../config/smarty.config.inc.php and change SmartyCustom into Smarty suddenly I get cache files again and all feels a lot faster; global $smarty; $smarty = new Smarty(); $smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile'); $smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); Hope this helps! Thanks for that advice, I am going to try that and see if that works for my problem. I am also currently checking with my hosting company and on Github, I'll post my findings here. Link to comment Share on other sites More sharing options...
webbwayne Posted August 24, 2015 Share Posted August 24, 2015 Thanks for that advice, I am going to try that and see if that works for my problem. I am also currently checking with my hosting company and on Github, I'll post my findings here. Did this work for your site? I'm running into the same issues. Once I clear cache my website slows down. It all started when I upgraded to 1.6.1. Anyone find a solution? Link to comment Share on other sites More sharing options...
pipo1000 Posted August 25, 2015 Share Posted August 25, 2015 There is a Forge ticket for this problem; http://forge.prestashop.com/browse/PSCSX-6607 please vote for this issue! Link to comment Share on other sites More sharing options...
webbwayne Posted August 25, 2015 Share Posted August 25, 2015 After some digging in GIT and looking at the smarty code I have found when I change; ../config/smarty.config.inc.php and change SmartyCustom into Smarty suddenly I get cache files again and all feels a lot faster; global $smarty; $smarty = new Smarty(); $smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile'); $smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); Hope this helps! This fix worked for me. Hopefully prestashop comes out with an official fix. 1 Link to comment Share on other sites More sharing options...
Mister Denial Posted August 26, 2015 Share Posted August 26, 2015 It worked for me too. Speed went from 10 seconds to 2.5 seconds. Thanks a lot pipo! Link to comment Share on other sites More sharing options...
adm666 Posted August 27, 2015 Share Posted August 27, 2015 THanks a lot, guys, thanx pipo! Definetely, reverting to Smarty() form SmartyCustom() made something for speed-upping. Not much, but nevertheless. Still there problem with (WTF) long spinning buttons like "save". Link to comment Share on other sites More sharing options...
garyjj127 Posted August 27, 2015 Share Posted August 27, 2015 THanks a lot, guys, thanx pipo! Definetely, reverting to Smarty() form SmartyCustom() made something for speed-upping. Not much, but nevertheless. Still there problem with (WTF) long spinning buttons like "save". The spinning save button is infuriating!! I have noticed that even though it takes ages for the spinning button to respond, the database updates quickly when saving. I ran two versions of the same page in different browser windows, and made a change to one and hit save. While waiting (10 seconds!) for the spinning button to save, I refreshed the page in the other window, and the changes had been made. So it seems that this may be due to the software rather than a slow DB connection, although admittedly I have no idea where the problem lies. Seems to me that most of the slow speed issues are to do with database requests/responses from PS, rather than slow server speeds. Link to comment Share on other sites More sharing options...
buco Posted August 27, 2015 Share Posted August 27, 2015 Hi! Two questions... - You have problems with the modules tab? When i click in "modules" the time to load is very high (initContent is the problem but i dont know how to correct it) - When you open a tab in other window your time to load is high or load normally? I changed this line and the time to load change, but not the same as 1.6.0.X Thanks!!! Link to comment Share on other sites More sharing options...
Mister Denial Posted August 27, 2015 Share Posted August 27, 2015 Two questions... - You have problems with the modules tab? When i click in "modules" the time to load is very high (initContent is the problem but i dont know how to correct it) - When you open a tab in other window your time to load is high or load normally? In my case, the slow module tab has always been a problem, even before 1.6.1 - sometimes it only takes 3-4 seconds to load, sometimes 10-20 - I suspect that this happens because the module page checks for new module versions on the Prestashop server. Regarding the slow save icon that keeps spinning, same thing, it also did happen on 1.6.0.9 and prior versions, in my case. But it's true what garryjj127 said, even if the button is still spinning, if you open the same page in another window, the change has been made. Link to comment Share on other sites More sharing options...
garyjj127 Posted August 27, 2015 Share Posted August 27, 2015 In my case, the slow module tab has always been a problem, even before 1.6.1 - sometimes it only takes 3-4 seconds to load, sometimes 10-20 - I suspect that this happens because the module page checks for new module versions on the Prestashop server. Regarding the slow save icon that keeps spinning, same thing, it also did happen on 1.6.0.9 and prior versions, in my case. But it's true what garryjj127 said, even if the button is still spinning, if you open the same page in another window, the change has been made. I don't have any issues with the module pages or any other pages in the back office, apart from the "Configuration Information" page. Occasionally they take a while to load, but it's usually first thing in the morning, and load pretty quick after that. I guess it's the browser looking to see if the page has changed compared to the cached version. Link to comment Share on other sites More sharing options...
codochi Posted August 27, 2015 Share Posted August 27, 2015 In my case, the slow module tab has always been a problem, even before 1.6.1 - sometimes it only takes 3-4 seconds to load, sometimes 10-20 - I suspect that this happens because the module page checks for new module versions on the Prestashop server. Regarding the slow save icon that keeps spinning, same thing, it also did happen on 1.6.0.9 and prior versions, in my case. But it's true what garryjj127 said, even if the button is still spinning, if you open the same page in another window, the change has been made. Following this tip: http://nemops.com/faster-prestashop-back-office-modules-themes-ads/#.Vd9s0PntlOZ Link to comment Share on other sites More sharing options...
the.rampage.rado Posted August 28, 2015 Share Posted August 28, 2015 After some digging in GIT and looking at the smarty code I have found when I change; ../config/smarty.config.inc.php and change SmartyCustom into Smarty suddenly I get cache files again and all feels a lot faster; global $smarty; $smarty = new Smarty(); $smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile'); $smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); Hope this helps! This worked for me too! Link to comment Share on other sites More sharing options...
buco Posted August 28, 2015 Share Posted August 28, 2015 Hi again!!!Finally i think that i solve the problem with BO speed. I change this line on smarty.config.inc.php, but also i clean modules because many of them causes low speed on backoffice. Mister Denial, if you on local installation rename modules folder and try to move on backoffice, the speed will be faster, after copy on five on five modules from rename folder to modules folder and try the speed. It´s o basically solution but i think that works :-) Thanks!!! 1 Link to comment Share on other sites More sharing options...
dcp Posted September 22, 2015 Share Posted September 22, 2015 can you introduce the Page Cache module that you used? Link to comment Share on other sites More sharing options...
Mister Denial Posted September 23, 2015 Share Posted September 23, 2015 can you introduce the Page Cache module that you used? I am using this: http://addons.prestashop.com/en/seo-prestashop-modules/7939-page-cache.html - it works really well, it reduces my TTFB from about 1.3 seconds to approximately 0.3 seconds. And I already have a highly optimized installation. I believe that on a slower server, you will even save more time, especially if you have a slow Time To First Byte. @ UGO: that's a good idea. Maybe we should make a list of slow modules, or a top list of modules that are causing problems on our individual installations, where users can vote on which module is causing them problems. In your case, which modules caused the most slowness? Also, on my current test installation, I am using the original Custom Smarty, there have been Github fixes issued that work. I think when 1.6.1.12 is issued, it should fix the problem. Link to comment Share on other sites More sharing options...
garyjj127 Posted October 1, 2015 Share Posted October 1, 2015 Do you mean this module? http://addons.prestashop.com/en/front-office-features-prestashop-modules/16692-page-cache-faster-prestashop.html The link you provided didn't seem to work. Anyhow, the module seems to make a huge amount of difference! I wonder how it reacts to changes on the site, in terms of updating templates etc..? Link to comment Share on other sites More sharing options...
delete-account-pleas Posted November 17, 2015 Share Posted November 17, 2015 Solution for your problem (will cut wait time to 5 sec max!) https://www.prestashop.com/forums/topic/483603-solution-slow-backoffice-long-wait-for-saving-icons-read-this-now/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now