Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

FILES

FILES <Number of Files>

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 FairCom DB is determined as follows:

  • Each open file consumes 1 file descriptor (this may be somewhat lower than the setting of the FILES keyword because individual superfile members and members of a host index do not consume file descriptors).
  • Each TCP/IP socket consumes a file descriptor (this corresponds to the CONNECTIONS keyword).
  • FairCom DB reserves a few file descriptors in addition to those used for data files, index files, and TCP/IP connections.

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.

Features for Handling File Descriptor Limits

Several features improve the ability of the system to handle situations concerning file descriptors:

See Also

MAX_FILES_PER_USER

COMPATIBILITY FILE_DESCRIPTOR_LIMIT

In This Section

Improved File Descriptor Limit Messages Logged During Server Startup

Server Now Fails to Start if File Descriptor Limit Can't be Increased to Required Value

Message Written to Standard Output When File Descriptor Limit is too Low

New file descriptor limit compatibility keyword

Previous Topic

Next Topic

Improved File Descriptor Limit Messages Logged During Server Startup

The file descriptor limit messages that FairCom Server logs to CTSTATUS.FCS at startup have been improved. The following information is logged:

  • the file descriptor limit was successfully increased
  • a warning that the maximum set by the system is not high enough to meet the server's file descriptor requirements
  • the limit and the file descriptor requirement values

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: FairCom DB was able to increase the limit:

Mon Apr 28 13:19:02 2014

- User# 00001 Successfully increased current file descriptor limit to: 11275

Previous Topic

Next Topic

Server Now Fails to Start if File Descriptor Limit Can't be Increased to Required Value

Appropriate operating system file descriptors are critical to FairCom DB 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.

Previous Topic

Next Topic

Message Written to Standard Output When File Descriptor Limit is too Low

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.

Previous Topic

Next Topic

New file descriptor limit compatibility keyword

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.

TOCIndex