Jump to content
mitzayapa

Very slow backend

Recommended Posts

Hi guys,

Every shop with 1.6 version works awfully slow in the backend. Ive tried disabling non native modules and overrides, no change at all. Various ps 1.6 diferrent shops affected, so its something widespread.

Any problem out there ?

Share this post


Link to post
Share on other sites

Hi,

Several of our clients have also reported slow backoffice today, in several different websites and servers ... it seems that some external dependency has some problem ...

Regards,

Share this post


Link to post
Share on other sites

Exactly the same problem on several 1.6 sites

It's due to very long time to get response fromapi.addons.prestashop.com

I've temporarily disabled connection to this api in classes/Tools.php

    public static function addonsRequest($request, $params = array())                                                                                                                                             
    {
        return false; 

 

Share this post


Link to post
Share on other sites

Indeed we have seen the same. Examining the page load from a stack trace it seems that the slowness is coming from the handshake with api and profile prestashop.com  

 

There is a bigger wait time when the prestashop IP's are connecting and responding.  

 

connect(10, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("91.240.109.18")}, 16) = -1 EINPROGRESS (Operation now in progress) poll([{fd=10, events=POLLIN|POLLOUT|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=10, revents=POLLOUT}]) getsockopt(10, SOL_SOCKET, SO_ERROR, [0], [4]) = 0

fcntl(10, F_SETFL, O_RDWR)              = 0

sendto(10, "POST / HTTP/1.0\r\nHost: api.addon"..., 268, MSG_DONTWAIT, NULL, 0) = 268 poll([{fd=10, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout) poll([{fd=10, events=POLLIN|POLLERR|POLLHUP}], 1, 5000

Share this post


Link to post
Share on other sites

I have disabled that long time ago. Prestashop does not have to establish a connection on every single click. Since i done that, prestashop runs tons of times faster than before.

Share this post


Link to post
Share on other sites

 

What part of the code should be deleted or modified?

 

public static function addonsRequest($request, $params = array())
    {
        if (!self::$is_addons_up) {
            return false;
        }

Share this post


Link to post
Share on other sites

This is for Prestashop 1.7

 

Change

 

    public static function addonsRequest($request, $params = array())
    {
        if (!self::$is_addons_up) {
            return false;
        }

 

To

    public static function addonsRequest($request, $params = array())
    {
            return false;

 

 

 

 

4 minutes ago, lorena said:

 

What part of the code should be deleted or modified?

 

public static function addonsRequest($request, $params = array())
    {
        if (!self::$is_addons_up) {
            return false;
        }

Share this post


Link to post
Share on other sites
1 minute ago, lorena said:

My prestashop is 1.6.1.13
It's the same solution?

 

From what I have read this morning, yes, it should be the same bit of code (of course make a copy before you adjust).

Share this post


Link to post
Share on other sites
3 hours ago, Befox said:

Exactly the same problem on several 1.6 sites

It's due to very long time to get response fromapi.addons.prestashop.com

I've temporarily disabled connection to this api in classes/Tools.php


    public static function addonsRequest($request, $params = array())                                                                                                                                             
    {
        return false; 

 

Thanks for solution! works for 1.6 version

Share this post


Link to post
Share on other sites

I changed 

protected static $is_addons_up = true; 

to 

 

protected static $is_addons_up = false;

 

But I still have the same problem. Do you have any other solution?

Share this post


Link to post
Share on other sites

mikecc444 You have changed the wrong bit of code by the looks of it

In classes/Tools.php

Change

 

    public static function addonsRequest($request, $params = array())
    {
        if (!self::$is_addons_up) {
            return false;
        }

 

To

    public static function addonsRequest($request, $params = array())
    {
            return false;

Share this post


Link to post
Share on other sites

thanks - PS. 1.7.2 - it works. 

what a bad joke of presta. Even the front runs just under 1 second faster.

Share this post


Link to post
Share on other sites
2 minutes ago, pdkey said:

thanks - PS. 1.7.2 - it works. 

what a bad joke of presta. Even the front runs just under 1 second faster.

 

That's exactly what we have noticed. The customer frontend was also stalling until we made the change and now, as you say pdkey, we are seeing pages loading extremely fast, probably twice as fast now.

More worrying, this has been going on over 24 hours and nothing has been mentioned, as far as I can see, by Prestashop that they are having issues with the addons subdomain. I really don't think 1 line of code should have impact across an entire webshop and makes me think what other "loose" bits of badly thought out code sit beneath the platform.

Share this post


Link to post
Share on other sites

disableaddonsapi (1).zip

this module we threw together and tested on one of our shops but it is on fast server in US so we did not see issue.

if someone would like to give it a try and let us know we can post in free module section.

works for 1.6/1.7.

thanks, el

Share this post


Link to post
Share on other sites

Thank you EL Patron. I have dowload it and install. Work nice to me. My version is: 
PrestaShop 1.6.1.20
inux #1 SMP Fri Jan 5 05:15:23 EST 2018 x86_64
Apache
PHP 7.1.0
MySQL 5.5.59-cll

Share this post


Link to post
Share on other sites

Problem is that addonrequest overrided by this module is used on the module list and for the updates. What about overriding the admincontrollerclass....:  filterTabModuleList and initTabModuleList, only used for the puzzle button on the top of every admin pages.

Share this post


Link to post
Share on other sites
39 minutes ago, jajalfplv said:

Problem is that addonrequest overrided by this module is used on the module list and for the updates. What about overriding the admincontrollerclass....:  filterTabModuleList and initTabModuleList, only used for the puzzle button on the top of every admin pages.

 

thanks for feedback, we need to re-institute our github so developers can add to code base....to be honest we probably will not dev this further....if you  would like to improve and  post back here that would be great.  (also I'm always  interested in new talent to join team, i.e. developer)  and I like it when someone  has a better idea...

Share this post


Link to post
Share on other sites

I tried this today and it works great: 

// @file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));

// $this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, _PS_TAB_MODULE_LIST_URL_);

//file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));

//file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_ALL_COUNTRY_MODULES_LIST, Tools::addonsRequest('native_all'));

//@file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));

 

 

Everything is ok on the modules page, and backoffice runs faster as ever

Share this post


Link to post
Share on other sites
16 hours ago, jajalfplv said:

I tried this today and it works great: 

// @file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));

// $this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, _PS_TAB_MODULE_LIST_URL_);

//file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));

//file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_ALL_COUNTRY_MODULES_LIST, Tools::addonsRequest('native_all'));

//@file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));

Please explane. Where to put this code
Thanks

Share this post


Link to post
Share on other sites
On 1/10/2018 at 12:26 PM, kacifashionuk said:

This is for Prestashop 1.7

 

Change

 

    public static function addonsRequest($request, $params = array())
    {
        if (!self::$is_addons_up) {
            return false;
        }

 

To

    public static function addonsRequest($request, $params = array())
    {
            return false;

 

 

 

 

Works fine in my PS 1.6.1.20 !

But Does anyone know if it is convenient to restore it after a while?

Share this post


Link to post
Share on other sites

My XML file got corrupted and could not login to backend anymore.

renamed the file /config/xml/must_have_modules_list.xml and I could login to backend once again.

What a  stupid mistake with high impact for the prestashop community!!!!!
 

 

Share this post


Link to post
Share on other sites

Hi! Why make it so complicated? Just turn of module "Tips and update and Gamification" or go to BO Administration -> Settings and turn of Automatic search for module updates.

Share this post


Link to post
Share on other sites

big problem for prestashop 1.6.1.4

at shop, admin zone, /index.php?controller=AdminInformation

this Configuration - Informaniton at backend - admin zone

loaded very, very slow 

2 dual core server with 4gb memory 

512mb for php 5.6

PrestaShop™ -  155.657s

real 200-300 secund !

 

Edited by skur2000

Share this post


Link to post
Share on other sites

I've just changed the name of the gamificaton module by adding a few xxx at the end (gamification-xxx) and now backoffice is super speedy.

Do I need Merchant Experience module? No, I don't.  And, as it seems the problem is coming from the Prestashop servers, I can later try by just renaming the module directory to it's original name and see if the problem is solved. 

Share this post


Link to post
Share on other sites
On 15.10.2018 at 4:55 AM, harun272 said:

I've just changed the name of the gamificaton module by adding a few xxx at the end (gamification-xxx) and now backoffice is super speedy.

Do I need Merchant Experience module? No, I don't.  And, as it seems the problem is coming from the Prestashop servers, I can later try by just renaming the module directory to it's original name and see if the problem is solved. 

Wow, this was the solution! Exactly, now my backend is fast as hell. Thank you so much!!

Share this post


Link to post
Share on other sites

My verson 1.7, I was having the same issues, VERY slow BO... after searching, I did this.....

I removed/uninstalled all modules that I was NOT using, INCLUDING  the dashboard modules.

I didn't mess with any code or file.......just uninstall what I dont use......

My BO now is fast, the same as any web page I bring up now.......if it dont work for you

you can always reinstall them.

Share this post


Link to post
Share on other sites
12 hours ago, DEN99 said:

My verson 1.7, I was having the same issues, VERY slow BO... after searching, I did this.....

I removed/uninstalled all modules that I was NOT using, INCLUDING  the dashboard modules.

I didn't mess with any code or file.......just uninstall what I dont use......

My BO now is fast, the same as any web page I bring up now.......if it dont work for you

you can always reinstall them.

 

 

I would never deinstall Dashboard Modules. These are the heart of a Shop. Thats a very very bad idea but however. The only thing you need to deinstall is gamification and all is done. That's what i did and its lightning fast with all dashboard modules intact.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More