0

Due to some reason my magento 2 website (Magento ver. 2.2.6) taking too much space from the server . Yesterday there is 1.2 gb available now only 240mb available . Please help on this .

Please see the attached picture now

enter image description here

UPDATE : I have found that most of the disk space is taken by /var/lib/mysql/webna this folder (42 gb). Here webna is my database name .In that folder i can see lots of IBD , FRM, MYI files. There is on file inside the webna folder called mageplaza_smtp_log.ibd and it's file size is 43 gb.

Please see the below image enter image description here

7
  • What is your total available space? Commented May 23, 2020 at 8:33
  • i have total 50gb available. Yesterday when i have space issue i removed 1.2 gb from server now after 12 hour 1.2gb disk space also used 0% left . Commented May 23, 2020 at 13:25
  • Check size of var/session ? Commented May 23, 2020 at 19:43
  • i have checked the var/session folder but it is only 100 mb Commented May 24, 2020 at 7:57
  • total size of /var/log/httpd is 676 mb Commented May 24, 2020 at 8:14

3 Answers 3

1

var/cache - store all cacheable objects but not page cache

var/page_cache cache from full page cache (if you don't use varnish or redis)

Doc: https://devdocs.magento.com/guides/v2.3/howdoi/php/php_clear-dirs.html

Your issue can be related with advanced reporting, but I don't know what version of Magento you use.

Check /tmp/analytics is it taking a lot of space?

Issue Magento 2.2.6 -advanced reporting

https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Disk-space-issues-related-to-Advanced-Reporting-cron-after/td-p/107219

You can install ncdu on server , it's nice visualization to find what is taking a lot of space.

Command:

ncdu / 

Update: Mageplaza SMTP log file was large.

15
  • dear friend my magento version is Magento ver. 2.2.6 . Now how can i solve this issue ? Commented May 24, 2020 at 1:53
  • I checked solution in the link . I don't have lib/internal/Magento/Framework/Archive/Tar.php (Because there is no folder named Magento in internal folder) . But i have vendor/magento/framework/Archive/Tar.php . But the tar.php is last modified in 09/06/2018 . I think i am using magento 2.2.6 for last one year but the issue is just happens in the last 3, days Commented May 24, 2020 at 2:05
  • I have removed 2 repetition of array_shift($dirFiles); in Tar.php and put $dirFiles = array_diff($dirFiles, ['..', '.']); as per the solution .I need to run any command in cmd after the code changes . Now how can i free up some space from server ? How can i make sure this is not happen again Commented May 24, 2020 at 2:13
  • after the change in tar.php file also i free up 40 mb by deleting some unnecessary files i uploaded previously but after 10 minutes now i have only 25 mb left . Please help Commented May 24, 2020 at 2:29
  • 1
    You can change in Magento backend => mageplaza SMTP configuration. To limit logs or disable them. Commented May 25, 2020 at 5:03
1

It seems that you're using Mageplaza SMTP module.

This module has a configuration setting to delete all emails after X days. Simply set to 30 days, and the next cron run will reduce your database size.

1
0

Did you check auto Backup (Scheduled Backup ) is enabled, under store->Configuration->ADVANCED->System->Backup Settings. you have to maintain your Backup Scheduled.

What specific version of Magento are you on?

How many SKU do you have in your store? #Sku's will drive page cache and block cache growth.

Its possible images being resized are also probably increasing storage space - when you import product photos we don't re-size the images until the store takes traffic. Your store is getting traffic and triggering the image resizes. You'll have a # of image resizes based on the # of different images your theme uses.

Have you tried flushing your cache? That should clean up the cache files from var/. You'd want to do that after you upgraded anyway so there's no harm in doing it before to reduce your backup time.

reference https://github.com/magento/magento2/issues/9458#issuecomment-298407480

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.