Ecommerce Shopify WordPress Discussion

bitnami /opt/bitnami/mysql/data increases in size over time

I'm having a similar issue as to what is described here which never received an answer. I'm running bitnami and my server space is filling up over time on what is a very simple static website. I narrowed the cluprit down to the /opt/bitnami/mysql/data folder which seems to be increasing in size at a rate of about 158KB per minute (aka 230MB per day). Some potentially relevant (or irrelevant) info I noticed: Running sudo du -b yields the following 10553149373 ./data but running ls -l yields the following drwxr-x--- 7 mysql root 12288 Dec 25 06:25 data The size of the data folder is stationary in the case of the ls command as each time I run that I get the same output. But the du command shows that the size is growing. And note the size difference between the two (I understand that du shows allocated space and ls shows actual usage. Why would one be so much bigger than the other - and why does du show it growing while ls does not).
It seems like there might be ongoing changes in the MySQL data directory that are not being reflected immediately in the ls command output. This could be due to file deletion or truncation, which ls doesn't immediately pick up. Also, MySQL may be creating temporary files or logs that are contributing to the growth. Let's try a few steps to investigate and address the issue: Check MySQL Log Files: Look into the MySQL error log to see if there are any errors or warnings related to the database. The log file is usually located in /opt/bitnami/mysql/data or a similar directory. Identify Large Files: Run the following command to identify the largest files in the MySQL data directory: bash Copy code sudo du -h --max-depth=1 /opt/bitnami/mysql/data This will show the size of each immediate subdirectory in the MySQL data directory. Check MySQL Tables: Log in to MySQL and check the size of your tables. You can use a query like this: sql Copy code SELECT table_schema "Database", sum(data_length + index_length) / 1024 / 1024 "Size (MB)" FROM information_schema.tables GROUP BY table_schema; This will show the size of each database. Check Binary Logs: MySQL might be generating binary logs that are taking up space. Check the MySQL binary log directory (usually /opt/bitnami/mysql/data or a subdirectory) and see if there are large binary log files. You can disable or limit the size of binary logs in the MySQL configuration if needed. Check for Unused Tables: Check for tables that may be no longer in use. Sometimes, tables get created for testing or temporary purposes and are forgotten. Optimize Tables: Optimize the tables in your database to reclaim space. You can do this by running the following command in MySQL: sql Copy code OPTIMIZE TABLE your_table_name; After performing these checks, you should have a better understanding of what is contributing to the growth of your MySQL data directory. If the issue persists, you may need to adjust your MySQL configuration, review the application code for any data-related issues, or consult with Bitnami support for more specific assistance with the Bitnami stack.

December 30, 2023

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.