Microsoft KB Archive/126954

{| = How to Allocate More File Handles for FoxPro 2.6 for UNIX =
 * width="100%"|

ID: Q126954

2.60 UNIX

The information in this article applies to:


 * Microsoft FoxPro for UNIX, version 2.6

NOTE: Microsoft does not support, endorse, or recommend SCO Unix or SCO Xenix. We provide the following information only as a convenience for our customers. Microsoft does not provide warranties of any kind on the following information, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

SUMMARY
For users of FoxPro on MS-DOS and Windows platforms, the error message "Too Many Files Open" is usually easy to correct by making some changes to the CONFIG.SYS or AUTOEXEC.BAT files and then rebooting the computer. However, to fix the same problem, FoxPro users under the UNIX operating system must tune the UNIX Kernel parameters, and then re-link the Kernel by shutting down and then rebooting the UNIX host machine.

WARNING: The information that follows illustrates a specific situation and is by no means the only Kernel configuration that would eliminate the "Too Many Files Open" error for the situation illustrated in this article. It is also important to note that tuning Kernel parameters is a complex and potentially dangerous process, and should be performed by experienced SCO administrators only.

MORE INFORMATION
By default, SCO sets up the host to support 60 files per user, 200 files system wide, and 100 locks system wide. This may be okay for most installations, but suppose you need to support 80 files per user?

What follows is a description of the process you need to follow to tune the Kernel on the SCO UNIX host to provide for two users opening 80 FoxPro tables simultaneously.

You could use an alternative method called the SYSADMSH (System Administration Shell) method if you prefer. For more information about using the System Administration Shell to tune the SCO UNIX Kernel, please see the following article in the Microsoft Knowledge Base:

ARTICLE-ID: Q124715 TITLE    : How UNIX Kernel Parameters Affect FoxPro for UNIX

Tuning the Kernel on the SCO UNIX Host for Two Users to Use 80 Tables Each
1. Login on the console as root.

2. At the "#" prompt, type:

cd /etc/conf/cf.d; /etc/conf/cf.d/configure 3. At the configuration menu, select "3. Files, Inodes, and Filesystems." 4. At the NINODE parameter prompt for the maximum number of open inodes

systemwide, enter 600. 5. At the NHINODE parameter prompt for the inode hash table size, enter 1024. 6. At the NFILE parameter prompt for the maximum number of open files systemwide, enter 512. 7. Skip past the next three parameters (NMOUNT, CMASK, and ETRUNC). At  the NOFILES parameter prompt for the maximum number of open files per process, enter 150. 8. Skip past the SHLBMAX parameter, and at the FLCKREC parameter prompt for the number of records that can be locked by the system, enter 1024. 9. Skip past the remaining prompts, and come back to the configuration menu. Press the "q" key. 10. You will be asked if you wish to update the system configuration files. Press the "y" key. The system should pause. Then you should get a   message stating that the configuration files have been updated. At that point, you should be back at the "#" prompt. 11. Re-link the Kernel by typing the following at the "#" prompt: ./link_unix

You will see a message stating that the UNIX Operating System will now be rebuilt, and that this might take a few minutes. 12. When this is done you will see a message stating that the UNIX Kernel has been rebuilt. You will then be asked if you want the new Kernel to   boot by default. Press the "y" key. 13. SCO UNIX will then let you know that the new Kernel has been installed. Then you will be asked if you want to rebuild the Kernel environment. Press the "y" key.

You will see the message: "Setting up new kernel environment." Then you will be at the "#" prompt. 14. Perform an orderly shutdown of the system, and then reboot. The new Kernel parameters will now be in effect. These settings represent a worst case scenario. Hopefully, you would not ever have to support two or more users who each need to have 80 tables open at the same time. Here's the reasoning behind the values presented above. Start with the maximum number of files that each user must have open at any one time, which in this case is 80. Now FoxPro tables can have other associated files like memo files and indexes, so for the worst case assume that all 80 files will have an associated memo file and one index (CDX) file, this brings the total to 240. You also have to allow for the files that FoxPro itself opens for operations.

The SCO products discussed here are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

Additional reference words: FoxUnix 2.60 KBCategory: KBSubcategory: FxenvOs

Keywords         : kb3rdparty kbenv FxenvOs Version          : 2.60 Platform         : UNIX
 * }