Setting Client Connection Limits for Transaction Engines

Every Storage Manager (SM) and Transaction Engine (TE) in the database reserves 250 file descriptors for connecting to other engines and to admin processes and admin clients. Any remaining file descriptors available to a TE will be used to support client connections (each active client connection requires one file descriptor). The operating system imposes a configurable limit on the maximum number of file descriptors per process; this determines the maximum number of concurrent SQL client connections that a TE can manage. The TE will print a message to the log file on startup which describes the maximum number of SQL clients it can handle.

When starting a TE, you can set a specific number of client connections using the --max-client-connections database option. If this value is larger than the available file descriptors, the TE attempts to change its own file descriptor limit to be high enough to accommodate the requested maximum. If the operating system does not allow this, the TE will not start.

For more information on using --max-client-connections, see Database Options.

Note: The limit must be changed before starting any NuoDB Admin (nuoadmin) processes, so that TEs started by NuoDB Admin will inherit that new limit; modifying the limit after NuoDB Admin processes start will have no effect.

If you want to increase the number of possible client connections beyond what's allowed by the operating system, you must modify the operating system's configuration.

For information on changing the maximum number of file descriptors allowed to a process, refer to the documentation for your operating system.

To determine how many file descriptors are available, run the following command (where serverID is the ID for a NuoDB Admin (or TE) process):

$ grep 'open files' /proc/serverID/limits
Max open files       1024       10240       files

Note: SQL client connections are spread across all the TEs in the database. However, it is important to ensure that your TEs have enough capacity so that if one or more other TEs go down, the remaining TE(s) can still service enough SQL clients that your application's availability is not impacted. There is no cost to allowing more file descriptors than are needed; they will not be assigned until or unless they are used.