Debug Your Infrastructure

Get Instant Solutions for Kubernetes, Databases, Docker and more

AWS CloudWatch
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Pod Stuck in CrashLoopBackOff
Database connection timeout
Docker Container won't Start
Kubernetes ingress not working
Redis connection refused
CI/CD pipeline failing

MySQL Full Disk/Storage Issues

Running out of disk space due to large logs, binary logs, or unoptimized data storage, leading to service disruptions.
  1. Check and Free Up Space:


- Identify and delete any unnecessary files or logs in the server to quickly free up space.
cd /var/log/mysql
sudo rm -rf your-unneeded-log-files.log


  1. Identify Large Tables:


- Use this query to find large tables that might be candidates for cleanup or pruning.
SELECT tableschema AS `Database`, tablename AS `Table`,
round(((data
length + indexlength) / 1024 / 1024), 2) `Size in MB`
FROM information_schema.TABLES
ORDER BY (data
length + indexlength) DESC;

  1. Cleanup Binary Logs:


- If binary logging is enabled and you don't need the old logs, you can purge them.
PURGE BINARY LOGS BEFORE '2023-01-01 00:00:00';

  1. Optimize/Prune Large Tables:


- Based on the previous step, decide if you can delete old or unnecessary data from large tables.
DELETE FROM yourtable WHERE yourdate_column < 'YYYY-MM-DD';
- After cleanup, optimize the table to reclaim space.
OPTIMIZE TABLE your_table;

  1. Compress Tables:


- For InnoDB tables, consider enabling compression for large tables.
ALTER TABLE yourtablename ROW_FORMAT=COMPRESSED;

  1. Increase Disk Space:


- If possible, add more disk space to the server. This might involve contacting your hosting provider or using cloud management tools depending on your environment.

  1. Check and Adjust Log File Size:


- If the InnoDB log files are consuming too much space, consider resizing them. Note: This requires restarting MySQL.
- Check the current size:
SHOW VARIABLES LIKE 'innodblogfile_size';
- To change the size, you'll need to edit the `my.cnf` or `my.ini` file and restart MySQL.

  1. Move Data Directory:


- If you have an additional storage device with more space, move the MySQL data directory to this location.
- Stop MySQL service.
sudo systemctl stop mysql
- Copy the data directory to the new location.
sudo cp -R -p /var/lib/mysql /new/path
- Update the `datadir` in `my.cnf` or `my.ini` with the new path and restart MySQL.

  1. Archive Old Data:


- If there are tables with historical data that are not frequently accessed, consider archiving this data to a separate database or storage.

  1. Check for Duplicate Indexes:


- Duplicate indexes can consume unnecessary space.
SELECT tableschema, tablename, GROUPCONCAT(indexname SEPARATOR ', ') AS indexes
FROM information_schema.statistics
WHERE table
schema NOT IN ('informationschema', 'mysql', 'performance_schema', 'sys')
GROUP BY table
schema, tablename, indextype, columnname
HAVING COUNT(*) > 1;

Master 

MySQL

 debugging in Minutes

— Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

MySQL

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe thing.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Deep Sea Tech Inc. — Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid

Debug Your Infrastructure

Get Instant Solutions for Kubernetes, Databases, Docker and more

AWS CloudWatch
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Pod Stuck in CrashLoopBackOff
Database connection timeout
Docker Container won't Start
Kubernetes ingress not working
Redis connection refused
CI/CD pipeline failing

Heading

This is some text inside of a div block.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

Master 

Heading

 debugging in Minutes

— Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

Heading

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe thing.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

No items found.
Deep Sea Tech Inc. — Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid