My server got tons of swap space errors:
It's the second time my server had this problem, every time it killed mysql and caused some down time. Both happened at the quiet time such as Sunday morning, so it seems not related to the server load. After the server recovered from the problem, everything seems fine:
The server has 2GB ram, MySQL was configured 500MB cache.
My questions:
- How to find out what caused the problem, or how to prevent this from happening again in the future?
- If it's not possible to track down the source, is increasing swap space a possible solution?
Thanks!
Code:
+swap_pager_getswapspace(9): failed
+swap_pager_getswapspace(5): failed
+swap_pager_getswapspace(5): failed
+swap_pager_getswapspace(9): failed
+swap_pager_getswapspace(9): failed
+swap_pager_getswapspace(6): failed
It's the second time my server had this problem, every time it killed mysql and caused some down time. Both happened at the quiet time such as Sunday morning, so it seems not related to the server load. After the server recovered from the problem, everything seems fine:
% swapinfo
Code:
Device 1K-blocks Used Avail Capacity
/dev/ad4s1b 2097152 74796 2022356 4%
The server has 2GB ram, MySQL was configured 500MB cache.
My questions:
- How to find out what caused the problem, or how to prevent this from happening again in the future?
- If it's not possible to track down the source, is increasing swap space a possible solution?
Thanks!