cancel
Showing results for 
Search instead for 
Did you mean: 

Errors in the application

porwaa
Advisor

Errors in the application


I'm getting the below errors in my application. Does that mean that I needto increasethe file descriptors.

2009 05 07 02:36:55 (001) main. setrlimit(RLIMIT_NOFILE) failed with code 22 /*2
*/
2009 05 07 02:36:55 (001) main. setrlimit(RLIMIT_STACK) failed with code 22 /*2*
/

Output of uname -a
HP-UX B.11.11 U 9000/800 3455890456 unlimited-user license
2 REPLIES
mobidyc
Trusted Contributor

Re: Errors in the application

Hello,

errno 22 = EINVAL

getrlimit(2) man page indicates this for EINVAL:
The setrlimit() function may fail if:

[EINVAL] The limit specified cannot be lowered because
current usage is already higher than the limit.
[EINVAL] A user with appropriate privileges has attempted
to raise rlp->rlim_cur or rlp->rlim_max to a value
greater than the system is capable of supporting.

[EINVAL] The value of rlp->rlim_cur is less than the number
of file descriptors the process already has
allocated.

[EINVAL] The value of rlp->rlim_max is less than the
current soft limit.

to check the maximum size of a core file (RLIMIT_CORE) run the following command:
ulimit -Ha
ulimit -Sa

i don't know hox to check RLIMIT_CPU

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Dennis Handly
Acclaimed Contributor

Re: Errors in the application

>setrlimit(RLIMIT_STACK) failed with code 22

If you need to increase this, you'll have to change the kernel parm maxssiz. You should be cautious doing this for 32 bit apps, since it decreases maxdsiz, if you have it at 1 Gb.