Summary information |
|
---|---|
Default value |
25 |
Range of values |
5–2147483647 |
Status |
Dynamic |
Display level |
Basic |
Required role |
System administrator |
Configuration groups |
Memory Use, User Environment |
number of user connections sets the maximum number of user connections that can simultaneously be connected to Adaptive Server. It does not refer to the maximum number of processes; that number depends not only on the value of this parameter but also on other system activity.
The maximum allowable number of file descriptors per process is operating-system-dependent; see the configuration documentation for your platform.
The number of file descriptors available for Adaptive Server connections is stored in the global variable @@max_connections. You can report the maximum number of file descriptors your system can use with:
select @@max_connections
The return value represents the maximum number of file descriptors allowed by the system for your processes, minus overhead. Overhead increases with the number of engines. For more information on how multiprocessing affects the number file descriptors available for Adaptive Server connections, see Chapter 5, Managing Mulitprocessor Servers,” in System Administration Guide: Volume 2.
In addition, you must reserve a number of connections for the following items, which you also set with configuration parameters:
The database devices, including mirror devices
Site handlers
Network listeners
The number of user connections + (number of devices * max online engines * 2) + number of remote sites + max number network listeners cannot be greater than the value of @@max_connections.
One connection from the configured number of connections is reserved for temporary administrative tasks to make sure that database administrators can connect to Adaptive Server. A reserved connection has a total login time of 15 minutes, and can be is allocated only to a user who has the sa_role. Adaptive Server terminates the connection after 15 minutes to ensure the availability of the reserved connection at an installation with multiple database administrators.
Adaptive Server also automatically uses this reserved connection when a client uses the last resource for connecting to Adaptive Server.
If Adaptive Server is using a reserved connection, the following informational message appears when the user logs in to Adaptive Server:
There are not enough user connections available; you are being connected using a temporary administrative connection which will time out after '15' minutes. Increase the value of th 'number of user connections' parameter
Adaptive Server also prints a message similar to the following to the error log when the final connection to Adaptive Server terminates due to a timeout:
00:00000:00008:2003/03/14 11:25:31.36 server Process '16' has been terminated as it exceeded the maximum login time allowed for such processes. This process used a connection reserved for system administrators and has a maximum login period of '15' minutes
There is no formula to determine how many connections to allow for each user. You must estimate this number, based on the system and user requirements. You must also take into account that on a system with many users, connections needed only occasionally or transiently can generally be shared among users. The following processes require user connections:
One connection is needed for each user running isql.
Application developers use one connection for each editing session.
The number of connections required by users running an application depends on how the application has been programmed. Users executing Open Client programs need one connection for each open DB-Library dbprocess or Client-Library™ cs_connection.
Sybase
suggests that you estimate the maximum number of connections used
by Adaptive Server and update number of user connections as
you add physical devices or users to the system. Periodically use sp_who to
determine the number of active user connections on your Adaptive
Server.
Certain other configuration parameters, including stack size and default network packet size, affect the amount of memory for each user connection.
Adaptive Server uses the value of number of user connections to establish the number of shared-memory connections for EJB Server. Thus, if number of user connections is 30, Adaptive Server establishes 10 shared-memory connections for EJB Server. Shared-memory connections are not a subset of user connections, and are not subtracted from the number of user connections.
To increase the number of user connections for shared memory, you must:
Increase number of user connections to a number one-third of which is the number of desired shared-memory connections.
Restart Adaptive Server.
Although number of user connections is a dynamic configuration parameter, you must restart the server to change the number of user connections for shared memory. See the EJB Server Users Guide.
With Adaptive Server version 12.5.3 ESD #2, no sockets
are automatically reserved for EJB. However, you can enable trace
flag 1642 to revert to the functionality of earlier version, reserving
one-third of the sockets for EJB. Enable traceflag 1642 to set up
the EJB server. For this version of Adaptive Server, you can ignore
this message, "hbc_ninit: No sockets available
for HBC",
in the error log if the EJB server
is not configured.
In Adaptive Server version 12.5.3 and later, if the EJB server
is enabled and HBC sockets are not available, "hbc_ninit:
No sockets available for HBC"
is reported.
If traceflag 1642 is not enabled, set the flag, and restart Adaptive
Server. If the EJB server is not enabled, then no message is reported and
Adaptive Server automatically disables the sockets reserved for
EJB server.