What does pool buffer threshold reached mean?

There are checks on the number of pool buffers used by custom servers. Their purpose is to prevent a custom server from using up all the buffers in the system, but they can also cause problems if not set correctly.

The two controlling variables are CA_THRESHOLD_PERCENTAGE and max_pool_buffers, shown in Figure 1:

CA_THRESHOLD_PERCENTAGE
This is an environment variable. If it is not set 75 will be used. It must be in the range 20 to 95.
max_pool_buffers
This is a variable held for each running custom server, set by a call to CA_Set_Options(). It defaults to the total number of buffers in the Number of Pool Buffers system parameter in the Application Server Interface group. It must be in the range 10 to Number of Pool Buffers.
Figure 1. Buffer pool usage
The diagram shows the buffer pool usage. The pool is limited by the system parameter, Number of Pool Buffers. This value defaults to 500 but has a range of 50 to 64 000. The diagram also shows the CA_Threshold_Percentage (an environment variable) and the value of the maximum cache buffers (a system parameter) as part of the buffer pool.

Buffer usage is monitored:

  1. During the processing of each OpenHostServerLink action.

    The custom server controller rejects the OpenHostServerLink action if:

    • The total number of buffers in use in the system is greater than the CA_THRESHOLD_PERCENTAGE of the total number of buffers in the system. This check has nothing to do with how many buffers are held by this custom server, or even by custom servers in general. If this check fails, the error “Pool Buffer Threshold Reached” is logged (error number 12005).
    • The total number of buffers owned by this custom server is greater than max_pool_buffers for this custom server. If this check fails, the error “Pool Buffer Threshold Reached” is logged (error number 12005). Note that this is the same error as the condition above.
    • The total number of bytes on the custom server's message queue is greater than the CA_THRESHOLD_PERCENTAGE of the maximum number of bytes on the queue. If this check fails, the error “Bytes on Message Queue Threshold Reached” is logged (error number 12005).
  2. During processing of each SendData, RecordVoiceToHost, or PlayVoiceFromHost action.

    The custom server router checks that the total number of buffers owned by this custom server is less than max_pool_buffers for this custom server.

    If this check fails, the SendData action is rejected, and the error “Pool Buffer Threshold Reached” is logged. Note that this is the same error as two of the OpenHostSeverLink conditions above, but you can distinguish this condition from the others because it specifies CA_ROUTER rather than CA_check_system_thresholds.

    The most common reason for a custom server using up buffers is that it has stopped servicing its message queue, but channel processes are still sending requests to it.

    A well-behaved custom server will not lose buffers. However, if it bypasses the normal behavior at termination, for example, exiting from its termination function rather than returning, or by installing its own SIGINT handler, then Blueworx Voice Response will not be able to clean up after it, and buffers can be lost.

    Use the DTmon -s command to obtain a snapshot of custom server buffer usage. For more information on DTmon, see the Blueworx Voice Response for AIX: Managing and Monitoring the System information.