sococa Posted July 10 Share Posted July 10 (edited) Server OS: Linux #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 Web Server Software Version: LiteSpeed PHP Version: 8.1.27 Memory Limit: 3072M Max Execution Time: 480 Max File Upload Size: 3072M PrestaShop Version: 8.1.1 Shop URL: https://lebrun.fr/prestashop/ Active Theme: lebrun (essentially the classic theme) MySQL Version: 10.11.7-MariaDB-cll-lve MySQL Server: 127.0.0.1:3306 Website URL: https://lebrun.fr/prestashop/ Hi everyone, The pagination is extremely slow (more than 10 seconds). This is the only time the site is slow. Otherwise, the navigation is fine. Also, once I have already paginated to a page, that page becomes fast. Has anyone encountered this problem before? I haven’t found any similar cases on the web except for one person who suggests enabling gzip here. I have optimized the images, enabled various caches on PrestaShop and on the server, installed the Product List Pagination module, but nothing works. Thank you for your help! 4o Edited October 14 by sococa (see edit history) 1 Link to comment Share on other sites More sharing options...
Prestashop Addict Posted July 10 Share Posted July 10 Try to deactivate Faceted search temporary, this can have effect on a lot of categories/sub categories Link to comment Share on other sites More sharing options...
Prestashop Addict Posted July 10 Share Posted July 10 You can also try to generate all images if you change images setting size. I also noticed your web server is not configured to gzip compression, and your static contents should have de long expiration date (images, js, css, fonts). Link to comment Share on other sites More sharing options...
sococa Posted July 11 Author Share Posted July 11 (edited) I always changed the images format in webp, but nothing is changing. I followed the doc of prestashop https://www.hostinger.com/tutorials/enable-gzip-compression but it seems that server don't use Gzip : I also tried to desactivate facetedSearch, no succes :/ Edited July 11 by sococa (see edit history) Link to comment Share on other sites More sharing options...
sococa Posted July 15 Author Share Posted July 15 (edited) Up please Update: i didn't see, but the search results are very slow too Edited July 15 by sococa (see edit history) Link to comment Share on other sites More sharing options...
sococa Posted July 18 Author Share Posted July 18 UP ! please Link to comment Share on other sites More sharing options...
ZMR Posted August 18 Share Posted August 18 (edited) I'm experiencing the exact same issues. I've tried Prestashop versions 1.7 and 8.1, and I'm having the same problems with all versions except for 1.6, which I'm currently using. Here's my situation: I've been using Prestashop 1.6 for the last 10-12 years. I've been trying to upgrade to the latest version for the past 2-3 years (yes, you read that right!). So, what's preventing me from upgrading? Here are the issues: Slow pagination: After upgrading to any latest version like 1.7.x.x and 8.1.x.x, pagination becomes very slow. It loads slowly at random, sometimes working fine for the first 4-5 pages, then becoming very slow and taking 10-12 seconds to load every next page. The pages load instantly when I visit them again. Slow orders page loading: The orders page in the backend takes around 120 seconds to load. The same page takes just 4-5 seconds to load in Prestashop 1.6 (there are lots of orders). Overall slow backend performance: Compared to Prestashop 1.6, the overall backend performance feels slow. I've tried the following: Uninstalled almost every module (including Faceted search). Used Memcached cache. Enabled/Disabled OpCache and Prestashop cache. Used different servers like Ubuntu, CentOS, Alma, Rocky, etc., with different configurations. Used different PHP versions from 7.4 to 8.2. Used different web servers like Apache and Nginx. Optimized the database. Re-built the search index and re-generated the images. Tried different themes. Hired some developers to fix the issues, but they couldn't understand the problem and blamed the large data. They said Prestashop 1.6 is very efficient in handling large data, but Prestashop completely restructured their code for later versions, which might be the problem. So I deleted all orders for testing, and it fixed the order page loading issue as expected (Deleting the orders is not a solution though). The pagination issue was not fixed even after deleting the orders. My current staging server configuration: Server OS: AlmaLinux 9.4 (Seafoam Ocelot) CPU: AMD EPYC-Milan Processor (8 cores) RAM: 16.00 GB Web Server Software Version: Nginx 1.26.1.1-2 PHP Version: 8.2.22 Memory Limit: 4096M Max Execution Time: 600 Max File Upload Size: 128M PrestaShop Version: 8.1.7 Theme: Default Classic theme Control panel: Plesk Obsidian 18.0.63 I hope someone can help me resolve these issues. Kind Regards Edited August 18 by ZMR (see edit history) Link to comment Share on other sites More sharing options...
Nickz Posted August 18 Share Posted August 18 (edited) 47 minutes ago, ZMR said: I hope someone can help me resolve these issues. due to some specific differences in Operating Systems, Theme applications, modules, version to version, most shops are not so similar. What all shops have in common is the database. Go to your backend and delete all those customers which are from years back. You should save their emails though. You server could also be the issue slowing down, the differences from hdd vs ssd are dramatic. Edited August 18 by Nickz (see edit history) Link to comment Share on other sites More sharing options...
ZMR Posted August 18 Share Posted August 18 The server has NVMe storage with 8 core processor and 16 GB of RAM, and I have also uninstalled all modules. I have mentioned what I have tried, please check and provide other suggestions if possible. 6 minutes ago, Nickz said: due to some specific differences in Operating Systems, Theme applications, modules, version to version, most shops are not so similar. What all shops have in common is the database. Go to your backend and delete all those customers which are from years back. You should save their emails though. You server could also be the issue slowing down, the differences from hdd vs ssd are dramatic. Link to comment Share on other sites More sharing options...
Nickz Posted August 18 Share Posted August 18 9 hours ago, ZMR said: I've been using Prestashop 1.6 for the last 10-12 years. Clean your database. What does the DB hold on data? MB or GB? 8 hours ago, ZMR said: please check and provide other suggestions if possible. Link to comment Share on other sites More sharing options...
sococa Posted August 20 Author Share Posted August 20 @ZMR Finally someone who understand my pain ! Is this a cache problem (i use MemCache too) ? Because when loading a page upstream, the loading is instantaneous. But i didn't succeed to solve the problem. I saw that we can activate the Gzip compression on the web server, but despite that i followed the doc, this seems to be not enable. have you ever tried this ? Link to comment Share on other sites More sharing options...
ZMR Posted August 20 Share Posted August 20 12 hours ago, sococa said: @ZMR Finally someone who understand my pain ! Is this a cache problem (i use MemCache too) ? Because when loading a page upstream, the loading is instantaneous. But i didn't succeed to solve the problem. I saw that we can activate the Gzip compression on the web server, but despite that i followed the doc, this seems to be not enable. have you ever tried this ? Yes, I also used gzip, but it did not fix the problem. I tried every possible solution, but nothing worked so far. Link to comment Share on other sites More sharing options...
sococa Posted August 21 Author Share Posted August 21 @ZMR unbelievable, and it seems that few people have the same problem... Anyone else ? Link to comment Share on other sites More sharing options...
Nickz Posted August 21 Share Posted August 21 4 hours ago, sococa said: it seems that few people have the same problem... Most people with a large Database have that issue. How large is yours? Link to comment Share on other sites More sharing options...
ZMR Posted August 21 Share Posted August 21 Yes, the database is huge. Mine is 3.35 GB. Link to comment Share on other sites More sharing options...
ZMR Posted August 21 Share Posted August 21 And Prestashop 1.6 is still working great! Link to comment Share on other sites More sharing options...
Nickz Posted August 21 Share Posted August 21 48 minutes ago, ZMR said: Yes, the database is huge. Mine is 3.35 GB. With 3.35 GB is no wonder that the pagination is pretty slow. Get rid of dead accounts ober the back end. After backing up the data of course. 1 Link to comment Share on other sites More sharing options...
ZMR Posted August 22 Share Posted August 22 10 hours ago, Nickz said: With 3.35 GB is no wonder that the pagination is pretty slow. Get rid of dead accounts ober the back end. After backing up the data of course. I understand, but the loading time should be similar for all pages. If one pagination page takes 10-12 seconds, then all pages should take a similar amount of time. However, the pagination loads instantly for most pages, then gets randomly stuck at some point, loads the next 3-4 pages very slowly, and afterwards loads instantly again. Interestingly, it seems that version 1.6 is more efficient at handling large data than later versions. For example, the "Orders" page in the backend takes around 7-8 seconds to load in PS 1.6, whereas the same page takes around 120 seconds in all later versions. Old is indeed gold! I'll try all upcoming versions and hope they'll improve handling of large data. Until then, I'm content with my PS 1.6. I appreciate all your help 1 Link to comment Share on other sites More sharing options...
Prestashop Addict Posted August 22 Share Posted August 22 Try to disable facetedsearch, this cause the issue with large catalog with many product combinations. Link to comment Share on other sites More sharing options...
ZMR Posted August 22 Share Posted August 22 1 minute ago, Prestashop Addict said: Try to disable facetedsearch, this cause the issue with large catalog with many product combinations. Thanks for your reply! However, please read what I have already tried. I have uninstalled all modules including the Faceted Search, but it didn't work. Also, we don't use combinations and it is disabled in the Performance settings. On 8/18/2024 at 5:25 PM, ZMR said: I'm experiencing the exact same issues. I've tried Prestashop versions 1.7 and 8.1, and I'm having the same problems with all versions except for 1.6, which I'm currently using. Here's my situation: I've been using Prestashop 1.6 for the last 10-12 years. I've been trying to upgrade to the latest version for the past 2-3 years (yes, you read that right!). So, what's preventing me from upgrading? Here are the issues: Slow pagination: After upgrading to any latest version like 1.7.x.x and 8.1.x.x, pagination becomes very slow. It loads slowly at random, sometimes working fine for the first 4-5 pages, then becoming very slow and taking 10-12 seconds to load every next page. The pages load instantly when I visit them again. Slow orders page loading: The orders page in the backend takes around 120 seconds to load. The same page takes just 4-5 seconds to load in Prestashop 1.6 (there are lots of orders). Overall slow backend performance: Compared to Prestashop 1.6, the overall backend performance feels slow. I've tried the following: Uninstalled almost every module (including Faceted search). Used Memcached cache. Enabled/Disabled OpCache and Prestashop cache. Used different servers like Ubuntu, CentOS, Alma, Rocky, etc., with different configurations. Used different PHP versions from 7.4 to 8.2. Used different web servers like Apache and Nginx. Optimized the database. Re-built the search index and re-generated the images. Tried different themes. Hired some developers to fix the issues, but they couldn't understand the problem and blamed the large data. They said Prestashop 1.6 is very efficient in handling large data, but Prestashop completely restructured their code for later versions, which might be the problem. So I deleted all orders for testing, and it fixed the order page loading issue as expected (Deleting the orders is not a solution though). The pagination issue was not fixed even after deleting the orders. My current staging server configuration: Server OS: AlmaLinux 9.4 (Seafoam Ocelot) CPU: AMD EPYC-Milan Processor (8 cores) RAM: 16.00 GB Web Server Software Version: Nginx 1.26.1.1-2 PHP Version: 8.2.22 Memory Limit: 4096M Max Execution Time: 600 Max File Upload Size: 128M PrestaShop Version: 8.1.7 Theme: Default Classic theme Control panel: Plesk Obsidian 18.0.63 I hope someone can help me resolve these issues. Kind Regards Link to comment Share on other sites More sharing options...
sococa Posted August 22 Author Share Posted August 22 (edited) I have a database with 3000 products and many categories. I'll try to clean my database and give you the result later... Edited August 22 by sococa (see edit history) 1 Link to comment Share on other sites More sharing options...
Nickz Posted August 22 Share Posted August 22 to speed it up: https://www.sqlbot.co/blog/sql-performance-tuning Some tips. beware and have or create back ups. 1 Link to comment Share on other sites More sharing options...
sococa Posted August 23 Author Share Posted August 23 "This process might feel tedious, but looking closely at more queries will give you the “big picture.” " My "big picture" : 😭😭😭 Link to comment Share on other sites More sharing options...
sococa Posted August 23 Author Share Posted August 23 @Nickz Do you think that the utilisation of a CDN can improve the speed ? The website is on OVH Link to comment Share on other sites More sharing options...
Nickz Posted August 23 Share Posted August 23 (edited) 6 minutes ago, sococa said: Do you think that the utilisation of a CDN can improve the speed ? usually nope, a CDN is often someplace else. Plus it's a source for slowing down shops and sites are CDN. A visitor fetches data from Shop A. Shop A fetches the requested data from the CDN and delivers that to the visitors browser. The CDN could sit next door to the visitor, it still has to send the data to the shop. On 8/22/2024 at 8:19 AM, ZMR said: I understand, but the loading time should be similar for all pages. If one pagination page takes 10-12 seconds, then all pages should take a similar amount of time. However, the pagination loads instantly for most pages, then gets randomly stuck at some point, loads the next 3-4 pages very slowly, and afterwards loads instantly again. It could be a memory issue. Send the server a ticket, HDD and also SSD fail sometimes. Edited August 23 by Nickz (see edit history) 1 Link to comment Share on other sites More sharing options...
sococa Posted August 23 Author Share Posted August 23 Ok thank you. Hostinger said this :"Improve your site's speed by up to 40% with Hostinger CDN."... Also i read the article you shared. with the debug tools from Prestashop, i see that queries are no really slows. The slowest query during 295.5ms ... However, i see that for charging a products page, Prestashop use 871 queries. Do you think that the problem is here ? and can i reduce this number ? Link to comment Share on other sites More sharing options...
Prestashop Addict Posted August 23 Share Posted August 23 CDN will improve static content (images videos, css, js...) has no effect to php code or sql queries 1 Link to comment Share on other sites More sharing options...
ZMR Posted August 23 Share Posted August 23 55 minutes ago, Nickz said: usually nope, a CDN is often someplace else. Plus it's a source for slowing down shops and sites are CDN. A visitor fetches data from Shop A. Shop A fetches the requested data from the CDN and delivers that to the visitors browser. The CDN could sit next door to the visitor, it still has to send the data to the shop. It could be a memory issue. Send the server a ticket, HDD and also SSD fail sometimes. I tried different servers from various companies with different configurations, including AWS EC2 instances. However, the performance remained the same across different servers. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted August 23 Share Posted August 23 Le 22/08/2024 à 11:01 AM, sococa a dit : I have a database with 3000 products and many categories. I'll try to clean my database and give you the result later... Did you tried to disable facetedsearch? It could be the issue with lot of categories. Link to comment Share on other sites More sharing options...
ZMR Posted August 23 Share Posted August 23 Not sure about Sococa, but I uninstalled all modules and tried, but nothing worked for me. There are only 56 categories without any subcategories. So there are just 56 categories in total. Total products are around 5000. Link to comment Share on other sites More sharing options...
sococa Posted August 23 Author Share Posted August 23 Indeed i tried too, without result like ZMR. Moreover, i need faceted Search ... That's not a solution for me Link to comment Share on other sites More sharing options...
ArnasDEV Posted September 8 Share Posted September 8 Memory Limit: 3072M Max Execution Time: 480 Why the hell you have such a big time for execution Time? It suppose to be 60s max. Memory limit 3GB for one php script? How much RAM do you have on your server? Link to comment Share on other sites More sharing options...
ZMR Posted September 8 Share Posted September 8 Are you talking about Prestashop? 60s max execution time might be low for Prestashop. Have you checked the official recommendations? What do you think about the official recommendations?https://devdocs.prestashop-project.org/8/scale/optimizations/ 1 hour ago, ArnasL - ArnasDEV said: Memory Limit: 3072M Max Execution Time: 480 Why the hell you have such a big time for execution Time? It suppose to be 60s max. Memory limit 3GB for one php script? How much RAM do you have on your server? Link to comment Share on other sites More sharing options...
ArnasDEV Posted September 9 Share Posted September 9 So as you see PrestaShop recommends memory_limit = 512M, I would increase this value only if you have more than 8GB RAM on your VPS. Max Execution time 300 doesn't make any sense in production. I only set this value when I do PS upgrade, because 1min is not enough to complete this upgrade process, meanwhile in production scripts shouldn't take longer than 1min. Imagine you have croniob which runs for 5min. Your website will be unstable atm. Instead script should be run in chunks to avoid downtime. Link to comment Share on other sites More sharing options...
sococa Posted September 9 Author Share Posted September 9 (edited) Hello, Thanks. i changed my config but Hostinger only propose bigs memory limits. Also, Prestashop says : "Optional settings: Please check the following error(s) Enable the PHP option "allow_url_fopen" on your server." But Hostinger says: "This option is a significant security risk, so do not enable it unless necessary." What am I supposed to do, please? Edited September 9 by sococa (see edit history) Link to comment Share on other sites More sharing options...
ArnasDEV Posted September 9 Share Posted September 9 allow_url_fopen must be ON I see you are using Hostinger Cloud plan, not VPS server, so they can have XXXX RAM in that server, in this case you suppose to leave Memory limit at the max - 3072M Link to comment Share on other sites More sharing options...
sococa Posted October 10 Author Share Posted October 10 Hello, I think i solved the problem. I succedeed to activating the gzip : by activation the php option "zlib.outputCompression" on hostinger, and add some lines in .htaccess by following this doc : https://www.hostinger.com/tutorials/enable-gzip-compression@ZMR Thanks everyone for helping me. 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