用戶才實行了LINUX5.8+11.2.0.4的RAC環境,使用1段時間后,當切換的grid用戶的時候,提示Resource temporarily unavailable,以下:
[root@rac01 bin]# su- grid
su: cannot set userid: Resource temporarily unavailable
但是我們在切換其他用戶如oracle用戶的時候,卻能夠正常切換,并且CRS集群使用正常,客戶真個連接和用戶的使用暫時也沒有影響,用戶在第1次出現這類情況的時候,采取重啟服務器的方式,暫時解決了問題,但是沒過量久,又再次出現,因此用戶需要完全解決這個問題,避免出現其他安全隱患,影響正常的業務利用。
1般出現這類情況,首先就應當斟酌我們在實行進程中操作系統中關于grid用戶資源限制的參數設置得可能存在問題,在實行RAC的進程中,對用戶的資源限制有2個地方/etc/security/limits.conf和/etc/profile,首先就應當檢測下這2個配置文件的內容,以下:
[root@rac01 ~]# cat/etc/security/limits.conf
grid soft nproc 16384
grid hard nproc 65536
grid soft nofile 2047
grid hard nofile 65536
oracle soft nproc 16384
oracle hard nproc65536
oracle soft nofile 2047
oracle hard nofile65536
[root@rac01 ~]# cat/etc/profile
if [ $USER ="oracle" ] || [ $USER = "grid" ]; then
if[ $SHELL = "/bin/ksh" ]; then
ulimit-p 16384
ulimit-n 65536
else
ulimit-u 16384 -n 65536
fi
umask022
fi
這里的nproc就是對用戶能夠使用的最大進程數的控制,其中soft是軟限制 ,用戶可以超過這個設置的值,但1定不能超過hard的值 。1般soft比hard小,hard是硬限制,/etc/security/limits.conf中的格式以下,這里以fszize這個參數為例:
我們這里的grid soft nproc 16384和grid hard nproc 65536就表示grid用戶最多能啟用65536個進程,其中到達16384就發出正告,接下來我們就應當查看下用戶的進程數,以下
[root@rac01 ~]# ps