[Linux] su: cannot set user id: Resource temporarily unavailable解決
今天ssh mysql db 測試服務器,進去切換成Mysql帳號報錯如下:
登陸mysql報錯如下:
[xxx@xxx-c003db2 ~]$ mysql -uroot -
ERROR 1135 (HY000): Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
切換進mysql用戶進去檢查:
[xxx@xxx-c001db2 mysqldata]$ sudo su - mysql
su: cannot set user id: Resource temporarily unavailable
經過檢查,確定是mysql有一個目錄/data/磁盤滿了,測試服務器是虛擬機,所以讓sa給/data/目錄增加了100M空間之後,就可以sudo su 進去了:
[xxx@xxx-c001db2 mysqldata]$ sudo su - mysql
[mysql@xxx-c001db2 ~]$
[mysql@xxx-c001db2 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Sys-root 1008M 222M 736M 24% /
tmpfs 16G 12K 16G 1% /dev/shm
/dev/vda1 485M 29M 432M 7% /boot
/dev/mapper/Sys-home 5.0G 146M 4.6G 4% /home
/dev/mapper/Sys-tmp 2.0G 68M 1.9G 4% /tmp
/dev/mapper/Sys-usr 5.0G 794M 3.9G 17% /usr
/dev/mapper/Sys-var 4.0G 526M 3.3G 14% /var
/dev/mapper/Sys-crash
4.0G 137M 3.7G 4% /var/crash
/dev/mapper/Sys-log 6.0G 1.7G 4.0G 30% /var/log
/dev/mapper/Sys-audit
2.0G 93M 1.8G 5% /var/log/audit
/dev/mapper/Sys-vtmp 1008M 34M 924M 4% /var/tmp
/dev/mapper/Sys-opt 9.9G 424M 9.0G 5% /opt
/dev/mapper/Sys-mysqlbackup
62M 5.3M 54M 9% /mysqlbackup
/dev/mapper/Sys-mysqldata
130G 124G 0 100% /mysqldata
/dev/mapper/Sys-mysqllog
9.9G 152M 9.2G 2% /mysqllog
9.5G 0 9.5G 0% /mysqldata/shared
呵呵,趕緊去清理磁盤上爆發增長的binlog日志吧,今天tester在做高並發測試。