Operating System - HP-UX
1753972 Members
8009 Online
108811 Solutions
New Discussion юеВ

Re: Too Many Open Files error message

 
yn_wangchao163.com
Occasional Advisor

Too Many Open Files error message

Hi,
I received some error message at syslog.log file.

sshd[6409]: error: openpty: Too many open files
sshd[6412]: error: session_pty_req: session 2 alloc failed
sshd[6412]: error: session_pty_req: session 1 alloc failed
sshd[6412]: error: session_pty_req: session 3 alloc failed
sshd[6409]: error: chown 0 0 failed: No such file or directory
sshd[6409]: error: chmod 0666 failed: No such file or directory
sshd[6409]: error: openpty: Too many open files
above message repeats 2 times
19 REPLIES 19
Steven E. Protter
Exalted Contributor

Re: Too Many Open Files error message

Shalom,

This would indicate a need to change some kernel parameters:

nfile
maxuprc


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
Johnson Punniyalingam
Honored Contributor

Re: Too Many Open Files error message

you need to tune 'maxfiles' kernal parameter and 'maxfiles_lim'. Check out the manpage.

what OS HPUX version.?

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Steven E. Protter
Exalted Contributor

Re: Too Many Open Files error message

I agree with the follow on post to mine.

I recommend sam kernel configuration configurable parameters for those who are new with the OS. Sam is replaced with SMH in the 11.31 OS.

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
Venkatesh BL
Honored Contributor

Re: Too Many Open Files error message

You may also want to see if the application is opening files and not closing them (due to a bug)...
Avinash20
Honored Contributor

Re: Too Many Open Files error message

At the same time you could check the output of

# sar -v 1 5

This will let us know if the number of files are getting filled, and if the kernel parameters needs to be increased.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Kapil Jha
Honored Contributor

Re: Too Many Open Files error message

Is this a new server or this problem came suddenly , if this came suddently and nothing was upgraded in server......no application, no DB etc.
Then you have to see which process is opening so many files(if you have lsof it can help you a lot in that).

And if this issue come after any upgrade then you have have to incrase above suggested parameter inclusing the need of that new application.

Don go and change kernel parameter at one instance you gotta see why that happened.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
yn_wangchao163.com
Occasional Advisor

Re: Too Many Open Files error message

Thanks everyone:
I saw maxuprc = 3780 by smh,but I can not find this parameter nfile. My os is HP-UX 11.31.
yn_wangchao163.com
Occasional Advisor

Re: Too Many Open Files error message

# sar -v 1 5

HP-UX pmsdb1 B.11.31 U ia64 03/11/09

09:08:32 text-sz ov proc-sz ov inod-sz ov file-sz ov
09:08:33 N/A N/A 502/4200 0 1484/35648 0 8480/2147483647 0
09:08:34 N/A N/A 505/4200 0 1488/35648 0 8482/2147483647 0
09:08:35 N/A N/A 502/4200 0 1495/35648 0 8480/2147483647 0
09:08:36 N/A N/A 503/4200 0 1484/35648 0 8483/2147483647 0
09:08:37 N/A N/A 503/4200 0 1485/35648 0 8484/2147483647 0
Dennis Handly
Acclaimed Contributor

Re: Too Many Open Files error message

>I can not find this parameter nfile.

nfile is no longer there on 11.31, so don't worry about it. That was the case where there were too many open files for ALL of the processes, not just the per process limit maxfiles_lim.
http://docs.hp.com/en/B2355-60130/nfile.5.html