skip to Main Content

I have one e-commerce website in Magento 2.2.2 and it keeps on going down almost every day. Whenever it goes down, users get site took too long too respond and it never loads. To get web site working again I have to restart the server and then it works.

Total space on the server is 50GB. Out of which the whole website is around 18GB (11GB Media files and then vendor files etc.). Here are things that i cannot figure out why:

a.) The server shows that 33GB has been used although it should show only 18GB has been used. I have checked everywhere and I can’t find what is consuming additional 15GB of space. Complete HTML folder is only 18GB.

b.) When I checked log files: it shows the following:

WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 100000; Allocated memory size: 280000000 bytes; InnoDB buffer pool size: 1073741824 bytes.

I have already set innodb_buffer_pool_size to 2GB. But still, this problem keeps coming.

The server is an Amazon EC2 server and Magento is in production mode. Can allocating 100GB instead of 50GB will solve the problem?

Increased innodb buffer pool size to 10GB and logs do not show error anymore but server still goes down every day. Since RAM is only 4GB on our server, can that be the main cause? Because everyone is suggesting at least 8GB RAM?

2

Answers


  1. A restart your mysql to make it effect ?
    Also you need to set that buffer up to 20971520000, thats around 20GB.
    Magento uses a lot of sessions and cache.

    Login or Signup to reply.
  2. Try the things below.

    Magento2 has big log files and caching system. There may be increase your files in var folder.
    But still you have to check whether your site belongs to more than 3000 products with high size images for products and you are storing all these in your server itself.

    The suggestions what I can give, If your site have more products which I already mentioned better you have to use CDN for better performance. So the entire image will be process from the third party.
    Next is You have to setup cloud flare to avoid the down time errors or customer side effect. You can make your index page to load while the server is down. And obviously you have to write script to restart the site automatically while its down.

    In your server side check the memory size for php, you can better to give to 2G.

    In Mysql side : Check the whether its making sleep query or not. If its making through your custom extension area ask your developer to optimize the code.
    for eg : May be the code passing ‘collection’ for a single item fetch.

    You can use the tool like nurelic

    If everything is fine from your developer area please try to optimize the site with making memory limit mysql killing etc.. with your server side.

    In the mean while magento is a big platform for e-commerce sector, so it has more area to cover by default. Better to avoid the unwanted modules from your active site, like disable the core modules which you are not using yet.

    For an average site Use 16gb RAM,

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search