Reputation: 71
The way our server is set up, we have 3 partitions.
I have a programmer on this server working with a 13 gig MySQL database. He gets no error messages from his script or MySQL while executing. According to our system admin the TMP file keeps filling up shutting down services.
Last night, the entire server was taken off line because of it. The script was running all day, it only filled up 4% of the TMP disk, however after I left work around 6 I got a call from my boss letting me know the server was off line.
After our system administrator got it back up I asked him what took it down and he said the TMP disk filled up. Just the day before we had a similar problem where the TMP disk filled up and shut down MySQL (I could confirm the SDA5 Disk was at 100% capacity unlike yesterday when the last time I checked it was at 4%).
My question is, when MySQL is running does it interact or write to any log or session in the TMP disk that could cause it to instantly fill up? Is my system administrator right? Is the TMP disk filling up crashing the server?
Upvotes: 0
Views: 473
Reputation: 750
Yes, MySQL does use a tmp dir for it's computations. And yes when you are working with large databases, the tmp files may be proportionately big.
However to avoid crashes in future. it is a good practice to point your TEMP_DIR to a place with enough storage space. Set the "TMPDIR" variable on your environment to an appropriate location. If unset, it will use /tmp/ by default
$ export TMPDIR=/path/to/location
Upvotes: 1