Sarang_2004
20th October 2004, 02:21
Hi All,

In one of the interfaces, suddenly I started getting fatal error "Too many files open". For the same number of records, the interface used to be ok. Now if the input file is small, (upto 40 records), the interface runs correctly. If there are more records (anything more than 45), I get a fatal error "Too many files open". Please tell me possible causes for this type of error.

Thanks in advance for your help.

Best Regards,
Sarang

NPRao
20th October 2004, 08:35
Sarang,

Refer to the BaanERP Programmers Guide

24 EMFILE - Too many open files
---------------------------------------------------------------------------
Description:
This error indicates that too many file descriptors are open. No user is allowed to open any file.

Solution:
No process can have more than 20 file descriptors open at a time. Ask your system administrator to change the following parameters to increase the number of open files that is allowed:
The NOFILES parameter, which defines the maximum number of open files per process and must have minimum value of 256. Preferably more.
The NFILE parameter, which defines the number of open files in Baan and must have minimum value of NOFILES * BAAN User License * 3 + 100. Preferably more

Please post your code if you still have issues.

Sarang_2004
22nd October 2004, 22:29
Thanks a lot Prashanth. My DBA refused to change these parameters. I reviewed the script again and noticed that the temperory files opened are not closed. I added a statement to close temperory files and it worked.

Thanks for your help.

Sarang

TheBurniou
24th November 2004, 17:20
Hi,

How can I see what value are set to the variables NFILE & NOFILES on my system (Baan V with Oracle 9i on Sun Unix) because I had an error 24 ?


Thanks.

NPRao
24th November 2004, 20:46
TheBurniou,

I am not sure on Solaris. But on HP-UX, you can use the command kmtune from the /usr/sbin

[DEV:bsp]/usr/sbin>kmtune | grep -i FILE
file_pad 10
maxfiles 4096
maxfiles_lim 4096
nfile (15*NPROC+2048)
sendfile_max 0
[DEV:bsp]/usr/sbin>kmtune | grep -i FILE
[DEV:bsp]/usr/sbin>kmtune | grep nproc
nproc 5000
[DEV:bsp]/usr/sbin>