Jump to content

[SOLVED] Impossibly slow loading pages - Time to First Byte 7 seconds


Recommended Posts

My site at www.mineralium-deadsea.com is experiencing extremely long load times for each page. The time to first byte is reporting as > 7 seconds and I have no idea why. More confusingly, the test site I have built at test.mineralium-deadsea.com which is almost an exact copy of the live site loads really fast (< 3 seconds).

 

As you can see in the attached Waterfall analysis from GTmetrix, the browser simply waits and waits for a response before starting to load all the page elements.

 

The server is fast, MySQL appears to be configured correctly. All other accounts on the server are fast including my test system.

 

Both production and test sites are on 1.5.4.1.

 

Can anyone help me?

 

Warren

 

Configuration:

 

Server information

Server information: Linux #1 SMP Tue May 14 20:38:14 MSK 2013 i686

Server software version: LiteSpeed

PHP version: 5.3.10

Memory limit: 95M

Max execution time: 600

Database information

MySQL version: 5.0.96-community

MySQL engine: InnoDB

Tables prefix: ps_

Store information

PrestaShop version: 1.5.4.1

Shop URL: https://www.mineralium-deadsea.com/

Current theme in use: warehouse

Mail configuration

Mail method: You are using the PHP mail function.

Your information

Your web browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

post-335620-0-31252500-1370923937_thumb.jpg

Link to comment
Share on other sites

Hi Warren,

 

This is not so much the software but on the server configuration.

 

php set to:

 

Memory limit: 128M

Max execution time: 30

 

set all caching off on the Performance page (admin), except Smart Cache ccc (css,java).

 

You memory limit (95M) is too low to use advanced caching.

 

also LiteSpeed must configured correctly (listening closely), and xcache can also break many on the memory/cpu.

Edited by petrovv (see edit history)
Link to comment
Share on other sites

Thanks for getting back to me but the server and its configuration are identical for the two sites. www.mineralium-deadsea.com and test.mineralium-deadsea.com are 2 accounts on the same server. Both have the same memory limit, max execution time and PS caching options yet the live site is slow and the test site is fast.

 

Any other ideas?

Link to comment
Share on other sites

Hi,

I've solved the problem so in case anyone else has the same issue, wanted to tell you that there is a bug with PS 1.5.4.1 in how it works with memcached which may drastically effect performance. By switching memcached caching off in the Performance page, I reduced response times from98 seconds to 3 seconds. I also have introduced Litespeed on my Linux server and set up a content distribution network (CDN) using cloud cache and my response time is down to around 1.9 seconds which obviously I'm very happy with. I assume that when PS eventually get the memcached problem solved and I switch it back on, I may even shave a little more off that time!

 

This is documented elsewhere here and here and in github.

 

 

Good luck!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...

My best combination for 1.6.1.1

 

php.ini

Memory limit: 128M
Max execution time: 30

and in the BO / Performance

Smart cache for CSS YES
Smart cache for JavaScript NO
Minify HTML NO
Compress inline JavaScript in HTML NO
Move JavaScript to the end YES
Apache optimization YES
 
Edited by Sickboards (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...