2

The server become slow when approximate 1000 users access the site at the same time, and later the server not responding at all (blank page).

I did the following tasks:

  • Production mode enable

  • Full cache enable

  • Compile the code (setup:di:compile)

  • Deploy static content (setup:static-content:deploy)

  • Merge JavaScript Files

  • Minify JavaScript Files

  • Merge CSS Files

  • Minify CSS Files

  • Apache GZIP compression

  • Enable use flat catalog category

Server

  • 32 RAM

  • 8 cores

I want to know what another thing can I do to improve the server performance and avoid the server crash?

Thank you very much.

  • solution is very simple: use profiler to check any slow calls, and enable autoscaling / second server + varnish cache. – MagenX Jul 10 '17 at 9:14
2

There are several steps to prepare for better performance:

  • Review the store's code and seek in the extensions you have installed for poor performance code.
  • Look in PHP/Apache logs if there is code that does infinite loops. There are extensions that do this. Infinite loops can quickly block all your server's traffic.
  • Add Varnish. It's the recommended page cache solution in Magento 2 and easy to setup. http://devdocs.magento.com/guides/v2.1/config-guide/varnish/config-varnish-magento.html
  • Use Redis as backend cache (see devdocs.mgento.com)
  • Use for sessions Memcached or Redis http://devdocs.magento.com/guides/v2.1/config-guide/memcache/memcache_magento.html
  • Have a CDN setup for your store
  • Put all Magento's indexers on Update by Schedule. It will re-index once in a minute and not immediately after customer's purchase. Indexer also triggers cache flushes (product pages, category pages). You can increase in Admin how often cron indexer runs.
  • While the traffic is high, try to minimize as much of possible to save products and categories. When admins do save products or categories, the cache of the stored is flushed and it has effect on customer's experience.
  • To minimize cache flushes after customer purchase in checkout use an extension like https://marketplace.magento.com/innovo-module-cache-improve.html In Magento 2 default, after each purchase the cache is cleaned on related pages with the bought products.
  • If one sever is not enough, than put your Magento 2 store on a cluster with multiple frontends, Varnish in front of them and your MySQL servers in salve/master mode.
0

I also have the same issue. I go with magewares crawler extension. This is awesome extension and support is also too good. You should try this to fly your website. https://magewares.com/magento-2-full-page-cache-warmer-cache-crawler.html Thanks

-1

try to use nginx + php-fpm + redis

redis settings here for the Magento page and default cache http://devdocs.magento.com/guides/v2.1/config-guide/redis/redis-pg-cache.html

Redis for session storage http://devdocs.magento.com/guides/v2.1/config-guide/redis/redis-session.html

  • seriously??? using nginx+php-fpm+redis will boost your shop to serve 1k users??? poor answer – MagenX Jul 10 '17 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.