Home > System Tutorial > LINUX > body text

Method - Increase the maximum number of open file descriptors under Linux

WBOY
Release: 2024-01-05 19:56:30
forward
1267 people have browsed it

I encountered an error when installing Oracle Grid Infrastructure to check constraints. It basically means that the maximum number of file descriptors that can be opened is 1024, and the requirement is 65536.

So execute ulimit -a under the girl user, and the maximum number of files that can be opened is 1024, which is the default value; execute ulimit -n 65536 and no modification is allowed. Go to root and execute ulimit -n 65536, and execute ulimit - a is displayed as 65536, and it is still 1024 when executed under the grid user. At that time, I thought of using sudo to execute, granting all permissions to the gird user, and executing ulimit -n 65536 still reported an error.

Later I remembered that in the configuration /etc/profile file, there is a ulimit -n 65536 command for oracle, as follows:

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

After adding the grid user, source /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

umask 022

fi

Executing ulimit -a on the grid is still 1024. Later, after checking the installation steps, I found that I forgot to add the grid user in /etc/security/limits. Just add the following:

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

It seems to be a scope problem, increase the file descriptor.

The above is the detailed content of Method - Increase the maximum number of open file descriptors under Linux. For more information, please follow other related articles on the PHP Chinese website!

source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template