Jump to content

Website Server Bottlenecking using Prestashop 1.5.4.1


Recommended Posts

Using Prestashop 1.5.4.1 and I recently moved to a dedicated server from a shared hosting account and yesterday we had about 100 active visitors on the website and it caused the server CPU to almost max out.

 

Here are the servers specs:

  • Intel Xeon Dual Core, 2.3GHz (4 threads)
  • 100 Mbps Uplink
  • 4 GB High Performance RAM
  • 500 GB RAID-1 Drives
  • 10 TB Bandwidth

 

Rather than the server crashing we were getting errors about mysql exceeding the max number of connections allowed. My hosting company said if I were to raise the number of max connections the server would eventually just crash so we had to choice but to wait out the traffic burst.

WHM process manager showed php and mysql to be bottlenecking the server:

 

PHP:

  • CPU Usage: 53.0%
  • Memory: 1.2%
  • Process: "/usr/bin/php /home/user/public_html/index.php"

 

MYSQL:

  • CPU Usage: 43.4%
  • Memory: 8.0%
  • Process: "/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/my.domain.com.err --open-files-limit=3072 --pid-file=/var/lib/mysql/my.domain.com.pid"

 

My performance configuration for prestashop is as follows:

 

Smarty:

  • Template cache: Never recompile template files
  • Cache: Enabled

 

CCC (Combine, Compress and Cache)

  • Use CCC for CSS: Enabled
  • Smart cache for JavaScript: Enabled
  • Keep inline JavaScript in HTML as original: : Enabled
  • Apache optimization: Enabled

 

Caching

  • Use cache: Enabled
  • Caching System: File System (I've tried using MemCached but it doesn't seem to work in Prestashop 1.5.4.1. Resulted in slower performance.)

Any help troubleshooting this issue would be greatly appreciated.

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

How many products do you have in your shop? How many categories? How many attributes do your products have on average? 

 

How many items do you have on sale in your shop? 

 

On a server that size your open files limit for mysql is also set too low. 

 

Do you have a link to the shop too?

 

What php interpreter are you using? 

Link to comment
Share on other sites

Hello, Thank you taking the time to evaluate my situation. To answer your questions:
 

  1. How many products do you have in your shop?
    407 active products.
     
  2. How many categories?
    15 with 33 Manufacturers.
     
  3. How many attributes do your products have on average?
    5-10 combinations. We have a few products that contain 25-35 combinations.
    I'm guessing we have around 6000-7000 unique products.
     
  4. How many items do you have on sale in your shop?
    I would say 70% of our store is on sale currently.
     

  5. On a server that size your open files limit for mysql is also set too low. 
    Can you elaborate more on this?
     

  6. Do you have a link to the shop too?
    Sorry, I'm not allowed to post the shops link on forums unfortunately.
     

  7. What php interpreter are you using?
    PHPStorm.

 

Please let me know if there is any more information you need and thank you for your help.

Link to comment
Share on other sites

Php storm is an editor, the most common interpreters are dso, suPHP, Fcgi, and mod_php. You should create a php info and see which one you are using.

 

As for the products on sale, if you are running the special block disable it and see if you can tell a difference. 

Link to comment
Share on other sites

Oh sorry about that. My config is:

Default PHP Version (.php files)     5
PHP 5 Handler     suphp
     
Apache suEXEC     on
Apache Ruid2     off

 

No I'm not running the specials block module.

 

Would it help to see the result of the profiler from prestashop?

Link to comment
Share on other sites

×
×
  • Create New...