A server configuration keyword, FILES, sets the maximum number of files to be open at one time.
There is no effective limit to the number of files supported by the FairCom Server, except for any limits imposed by the operating system and available system memory.
Note: The number of file descriptors set by the FILES keyword may need to be considerably greater than the number of open data files. Each index, whether or not in a separate file, counts toward this total. For example, a host index file that supports three different keys (i.e., contains three separate index members) counts as three files toward the FILES total. In addition, each member of a superfile is counted toward the total set by the FILES keyword.
Unix/Linux Considerations
The Unix and Linux operating systems place a limit on the number of file descriptors that can be in use at one time. The number of file descriptors required by c-treeACE is determined as follows:
Based on the above considerations, the system should be configured to allow a number somewhat greater than the number of files + connections.
The file descriptor limit is typically set by the limit or ulimit command, which may require superuser access, or by the hard limit set in a system configuration file such as /etc/security/limits.conf on Linux. The specifics vary by system, so consult the documentation for your Unix or Linux system. (Unix and Linux define both hard limits and soft limits. A soft limit can be changed by a process at any time, but it cannot exceed the hard limit. The hard limit is of interest for this discussion.)
Note: When the file descriptor limit for FairCom Server (set by the operating system) is set too low, server startup fails with error 1005 (system-dependent initialization failed). A message is written to standard output indicating that system-dependent initialization failed and that details are in CTSTATUS.FCS.
New Features for Handling File Descriptor Limits
Several new features improve the ability of the system to handle situations concerning file descriptors:
The file descriptor limit messages that FairCom Server logs to CTSTATUS.FCS at startup have been improved. The following information is logged:
Now we also include the user limit in the file descriptor limit, because a TCP/IP socket uses a file descriptor.
Note: If the file descriptor limit cannot be increased to the required value, server startup fails. See Fail server startup if file descriptor limit can't be increased to required value.
Sample messages
Case #1: The system file descriptor limit is not high enough:
Mon Apr 28 13:17:55 2014
- User# 00001 ERROR: The hard limit on file descriptors available to this process (4096) is lower than the database engine's file descriptor requirement (11275). Either increase the hard limit, or decrease the FILES or CONNECTIONS settings.
Case #2: c-treeACE was able to increase the limit:
Mon Apr 28 13:19:02 2014
- User# 00001 Successfully increased current file descriptor limit to: 11275
Appropriate operating system file descriptors are critical to c-treeACE server operation.
Note: If a file descriptor limit set by the operating system cannot be increased to the required value, server startup fails with error 1005 (system-dependent initialization failed).
If the file descriptor limit set by the operating system isn't high enough, it is possible to fail to open a transaction start file when performing a checkpoint, causing the server to terminate abnormally. This behavior avoids a runtime error by catching the insufficient file descriptor limit at server startup.
When the file descriptor limit for FairCom Server (set by the operating system) is set too low, a message is written to standard output indicating that system-dependent initialization failed and that details are in CTSTATUS.FCS.
Although running FairCom Server with insufficient file descriptors can lead to errors opening files, we have added a compatibility keyword, COMPATIBILITY FILE_DESCRIPTOR_LIMIT, that restores the previous behavior in case it is not convenient for a system administrator to set the file descriptor limit for the FairCom Server process to the required value or it is not desired to decrease the FILES or CONNECTIONS settings.
Note: Use of this keyword is generally discouraged. It is provided for backward compatibility or short-term use until site administrators are able to increase file appropriate file descriptor limits for a FairCom Server process.
A message is also logged to CTSTATUS.FCS explaining that the COMPATIBILITY FILE_DESCRIPTOR_LIMIT configuration option can be used to allow the server to start in this situation:
Tue Apr 29 12:23:44 2014
- User# 00001 ERROR: The hard limit on file descriptors available to this process (500) is lower than the database engine's file descriptor requirement (1043). Either increase the hard limit, or decrease the FILES or CONNECTIONS settings.
Tue Apr 29 12:23:44 2014
- User# 00001 Note: The configuration option COMPATIBILITY FILE_DESCRIPTOR_LIMIT can be used to allow c-tree Server to start even if the file descriptor limit is insufficient. However, this can lead to errors opening files.