Tuesday, March 12, 2013

su: cannot set user id: Resource temporarily unavailable

Today I had a customer complaining about his DB that nobody can login anymore. The number of max sessions (in the DB) was set to 4096 and there were about 2048 current seesion on the DB. So, what was wrong?
I decided to login as root into the DB server which worked wihtout any issue. The system it self was OK, enough memory free, no filled volumes etc. Then I tried to switch to the oracle user: 

# su - oracle
su: cannot set user id: Resource temporarily unavailable

OK, it seems that the system cannot create any more sessions for the oracle user. A quick check about the number of operating system processes gave me the final clue:

# ps -U oracle | wc -l

The number of processes was 2048 and this value can be set in the file /etc/security/limits.conf:

# cat /etc/security/limits.conf
oracle soft nproc 2048

I just changed the value for the number of processes (soft nproc) to 4096 (the same value for the maximum number of sessions inside the DB) and the customer could work normally again.

No comments:

Post a Comment