Operating System - HP-UX
1837939 Members
2527 Online
110124 Solutions
New Discussion

"too many open files" with kernel parameters ok

 
aena
Frequent Advisor

"too many open files" with kernel parameters ok

Hello,

we have one process runing on hp-ux 11i. The kernel is ok, and the "sar -v" goes fine.

The user, owner of the procces, has the limit at 2048, but whit "lsof", we can see than the process have 1027 descriptors opened only.

What can be happening?

Thanks,
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: "too many open files" with kernel parameters ok

Shalom aena,

A few possible factors.

maxuprc

Maximum processes allowed for any given user.

check kmtune for its setting.

If the user is exceeding maxuprc then that would totally explain the problem.

To fix it, you must change the parameter, compile, place the kernel and reboot.

The default setting is 75.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sameer_Nirmal
Honored Contributor

Re: "too many open files" with kernel parameters ok

Hi,

I guess you need to increase the "maxfiles" kernel parameter which defines ( soft limit )max number of files could be opened by a "process". If you want a hard limit , then you can set the "maxfiles_lim" parameter.
aena
Frequent Advisor

Re: "too many open files" with kernel parameters ok

Kernel is not the problem...

maxfiles 2048
maxfiles_lim 2048 nfile 7649
nproc 4020

sar -v 1 10

15:07:24 text-sz ov proc-sz ov inod-sz ov file-sz ov
15:07:25 N/A N/A 170/4020 0 1479/4688 0 4282/7659 0
15:07:26 N/A N/A 170/4020 0 1479/4688 0 4282/7659 0
15:07:27 N/A N/A 170/4020 0 1479/4688 0 4280/7659 0
15:07:28 N/A N/A 170/4020 0 1479/4688 0 4280/7659 0


.....
aena
Frequent Advisor

Re: "too many open files" with kernel parameters ok

... and...

nfile 7649
maxuprc 3618

Sameer_Nirmal
Honored Contributor

Re: "too many open files" with kernel parameters ok

Check for ulimit file descriptor value .
I guess it's default value is 1024. If it is 1024 , then you need to increase it using
# ulimit -n

Can you tell more about that process like What it does, How it is started/run ?
Where/when do you see this error ? Is it happen always?
Do you see any other messages in dmesg or syslog when it happens?
Any recent changes in the system?