januzi2 Posted December 5, 2019 Share Posted December 5, 2019 (edited) Hello Some time ago the main admin page started to work very slowly and now it sometimes leads to the 504 message. I've checked other parts of the admin page and it is working all right, so the problem is only in the controller=AdminDashboard. I've turned the profiler on and it says that the init is taking 43 seconds to complete. How can I find the main source of those timeouts? One more thing: statistics don't show anything. Edit1: Never mind the stats, I've found that the line: $this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array())); is the source of the long generating time. Could somebody tell me what does it do and what can I do, to speed this thing up? Edit:2 So, the gamification module is doing that. With the return false: "public function hookDisplayBackOfficeHeader() { return false;" dashboard is working a lot faster. I'm pretty sure that the line: $advice_css_content = Tools::file_get_contents(Tools::getShopProtocol().'gamification.prestashop.com/css/advices/advice-'._PS_VERSION_.'_'.(int)$advice['id_ps_advice'].'.css'); is the main source for the slowness. Do I have to change anything else or this is it? Edited December 5, 2019 by januzi2 I've found the offending line + I've found the problematic module (see edit history) 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