nurelm Posted June 13, 2013 Share Posted June 13, 2013 We've been experiencing a problem with a website that manifests itself when the site was moved from development to a production server. The dev server is a smaller slower machine, but the site runs at normal speed there, while the production server is much faster (contains a few perfectly fast PS sites) but the site is slow there (well over 10s to add a product to the cart). Both sites are configured identically and running on the same OS (both virtual machines running CentOS 5.9, but the dev site that is running at normal speed is just configured with less memory/ CPU / disk space than the production site which is slow). On both sites all caching is off, ajax cart is off, friendly URLs are off, both are updated to the latest PS version (1.5.4), and just to be sure everything was the same, we made an exact copy of the production site / DB and put it on the dev server (same results). Here's a corresponding product page on both sites, try adding the product to your cart to see the speed difference: Production Site (slowwwwwww): http://www.treefrogf...troller=product Dev Site (normal speed): http://treefrog.nure...troller=product Attached are images showing the profiler output (_PS_DEBUG_PROFILING_ set to true in config/defines.inc.php) for both sites. The slow site runs more queries for some reason, but the time spent doing those queries is not a significant portion of total load time for either scenario. As you can see in the images, the big time eater on the slow site is shown as being in the "init" phase, so maybe someone could provide guidance on troubleshooting this further. Any help troubleshooting would be very much appreciated! Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 13, 2013 Share Posted June 13, 2013 Hello, thank you for the post When I tested both websites, they both ran fast and at the same speed until I added a product to cart. When looking at the Chrome Dev Console, I saw a difference between these two identical product pages (one dev, one production) Dev: http://treefrog.nure...troller=product Production: http://www.treefrogf...troller=product The difference is attached in the picture. Could it be that the font transfer is causing the extra load time? 1 Link to comment Share on other sites More sharing options...
mikey3232 Posted June 13, 2013 Share Posted June 13, 2013 We had the same issue, we found to have to do with the shipping modules fedex/usps that came with 1.5.4 install as default addons. When we disabled, the site speed would be 100%, when enabling carriers, it would make the site come to a crawl when adding products to the site. We ended up having to buy custom modules for fedex/usps to avoid the issue. Link to comment Share on other sites More sharing options...
nurelm Posted June 13, 2013 Author Share Posted June 13, 2013 (edited) Thanks Benjamin for finding that. It was due to a missing mime type on the production (slow) server. We fixed it but it doesn't seem to be related to the problem. mikey3232, we'll try turning off shipping modules to see if that is the issue, thanks for the suggestion. The biggest chunk of time is being spent in "init" according to the profile ... any idea what that means or how we can troubleshoot it? Edited June 13, 2013 by nurelm (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 13, 2013 Share Posted June 13, 2013 This is interesting, have you changed anything? The speed of the checkout seems faster but adding a product or deleting a product from cart takes 4-6 seconds. Link to comment Share on other sites More sharing options...
nurelm Posted June 13, 2013 Author Share Posted June 13, 2013 (edited) The one change we made that made a difference was disabling the UPS module. This took the time of adding a product from around 8.6s to 4.6s. This is still slower than we'd like, but way faster than it was. Is it possible that the UPS module is communicating in any ways that might be blocked by more aggressive firewall settings on the production server vs development server? Either way, 4.6s to just add something is still way slower than any other PS site hosted on the same machine, something else must be going on as well. Edited June 13, 2013 by nurelm (see edit history) Link to comment Share on other sites More sharing options...
nurelm Posted June 13, 2013 Author Share Posted June 13, 2013 (edited) We haven't been able to figure out the speed issues. Turning caching on has put a bandaid on the problem by making products that have been previously added fairly fast, but adding something for the first time, or adding a product you have already added in order to have a different number of that product in your cart than have ever been added, is still extremely slow, and any insight on how to troubleshoot further would be super valuable to us. Correction: Caching will only speed up a few products at a time, so the majority of additions to a cart still require 10s+ to complete Edited June 13, 2013 by nurelm (see edit history) Link to comment Share on other sites More sharing options...
nurelm Posted June 13, 2013 Author Share Posted June 13, 2013 One more note: Switching to the default theme does not seem to resolve the issue, either. Link to comment Share on other sites More sharing options...
nurelm Posted June 15, 2013 Author Share Posted June 15, 2013 It turns out that mikey3232 was right on the money. We tried disabling both FedEx and UPS with no effect, and decided that wasn't the issue, but when we finally just completely uninstalled both it worked. Turns out that FedEx is causing our problem (using just UPS works). Does anyone know if that module makes a request when adding or removing a product to a cart that might be getting blocked? Meanwhile, we'll try installing Prestochango's FedEx module to see if it works properly. Link to comment Share on other sites More sharing options...
nurelm Posted June 16, 2013 Author Share Posted June 16, 2013 One final note to confirm that this issue is resolved. We uninstalled both the UPS and FedEx modules that come with PS. Both turned out to be extremely slow. We installed Prestochango's modules, and adding an item to the cart is now reasonably fast (2.5s for the AJAX call before it is cached ... would like it to be faster, but this is at least acceptable ... and a fraction of a second once the shipping rate is cached). Thanks to mikey3232 for pointing us in the right. Link to comment Share on other sites More sharing options...
Spyhawk Posted August 13, 2013 Share Posted August 13, 2013 That is not really a solution, just a $100 work around. As I am having this same issue with adding and removing items to the cart, anyone else have an idea that we could try? Any help would be appreciated. Link to comment Share on other sites More sharing options...
Ray UK Posted August 14, 2013 Share Posted August 14, 2013 I found the animation of the products flying over to the cart to slow our site down. I have disabled this and use a modal window, which is faster and looks more professional. The instructions for doing this are on this page. http://nemops.com/better-prestashop-add-to-cart/ Just do step 1 first, and if you want the popup modal window then carry on with the rest Link to comment Share on other sites More sharing options...
Spyhawk Posted August 14, 2013 Share Posted August 14, 2013 The issue unfortunately is not ajax or the animation, it has to do with the FedEx module. Every time an item is added to the cart or removed there is a delay of 20-30 seconds before its added or removed from the cart. If i disable the FedEx module, everything runs at normal operational speed. Link to comment Share on other sites More sharing options...
xthunder Posted October 25, 2013 Share Posted October 25, 2013 I have the same problem as Spyhawk so I disabled the FedEx module and disable all of the fedex carriers from Shipping->Carriers. This helped but it is still painfully slow to add/remove items to/from the cart and updating quantities on the cart is still very slow... Doing more searching...... Link to comment Share on other sites More sharing options...
zeki893 Posted November 26, 2014 Share Posted November 26, 2014 Has there been any updates to this issue yet? Running 1.6.0.9 with the UPS module enabled and adding an item to the cart takes about 5-10 seconds. It adds it instantly with the UPS module disabled Link to comment Share on other sites More sharing options...
Mymiloz Posted February 24, 2016 Share Posted February 24, 2016 Im experiancing same problem, but i think i know why. 1.im developing my fedex shipping, this module take few second to get rate from their fedex web this problem make slow in adding product items. 2.for something i dont understand getordershppingcost function always looping 3. So i think using any shipping modul who connect to external web, cause slowing (Sorry my english) 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