Hey all,
I'm stumped on an issue we had the other day. A poorly written query was run multiple times simultaneously on a dedicated MySQL database ESXi VM running 12.2-RELEASE with 16G RAM & 8G swap partition. The root fs is 12G, of which about 50% is typically available. /var/db/mysql is mounted on a separate drive.
When I was first notified of the problem, the console was reporting that it was out of swap, and I couldn't stay logged in for more than a few seconds without getting kicked out (console or ssh). The shell was closed before I could shut down mysql-server, and after multiple attempts, I finally was able to get a 'reboot' squeezed in.
After the system came online, the shell was no longer kicking me out, but a few moments later I was getting swap errors as well as disk full errors on the root fs. Shutting down mysql would solve the problem, but it would happen every time I fired the service back up.
The saturated RAM & swap make sense, given that the query was hammering the database itself. I'm assuming there's some limits on mysql that I need to put in place to ensure that it doesn't exhaust available memory, but that's not the mystery.
The mystery is why the root fs was filling up. 'df -h' would show the size of /, but 'du -s /*' wouldn't show anything getting larger. /var would grow by a few hundred megs, but not 5G. Whatever it was, it was dynamic - it would fill the filesystem one second, and the next there'd be a few hundred megs available.
I was under pressure to get services back up and running, so I may have missed something, but looking through my scrollback doesn't reveal where the disk usage was coming from. The only thing I can see that I missed was looking at /'s dotfiles with 'du', but the only file other than '.profile', '.cshrc', and '.snap' is '/.sujournal'. Could that be the culprit?
I've been working with FreeBSD since it came on floppies, and this one has me flummoxed. Anyone have a clue-stick they can beat me with?
I'm stumped on an issue we had the other day. A poorly written query was run multiple times simultaneously on a dedicated MySQL database ESXi VM running 12.2-RELEASE with 16G RAM & 8G swap partition. The root fs is 12G, of which about 50% is typically available. /var/db/mysql is mounted on a separate drive.
When I was first notified of the problem, the console was reporting that it was out of swap, and I couldn't stay logged in for more than a few seconds without getting kicked out (console or ssh). The shell was closed before I could shut down mysql-server, and after multiple attempts, I finally was able to get a 'reboot' squeezed in.
After the system came online, the shell was no longer kicking me out, but a few moments later I was getting swap errors as well as disk full errors on the root fs. Shutting down mysql would solve the problem, but it would happen every time I fired the service back up.
The saturated RAM & swap make sense, given that the query was hammering the database itself. I'm assuming there's some limits on mysql that I need to put in place to ensure that it doesn't exhaust available memory, but that's not the mystery.
The mystery is why the root fs was filling up. 'df -h' would show the size of /, but 'du -s /*' wouldn't show anything getting larger. /var would grow by a few hundred megs, but not 5G. Whatever it was, it was dynamic - it would fill the filesystem one second, and the next there'd be a few hundred megs available.
I was under pressure to get services back up and running, so I may have missed something, but looking through my scrollback doesn't reveal where the disk usage was coming from. The only thing I can see that I missed was looking at /'s dotfiles with 'du', but the only file other than '.profile', '.cshrc', and '.snap' is '/.sujournal'. Could that be the culprit?
I've been working with FreeBSD since it came on floppies, and this one has me flummoxed. Anyone have a clue-stick they can beat me with?