Using BBj In High Traffic Conditions


BBj is powerful and stable, even under high traffic conditions. However, certain circumstances necessitate minor configuration changes in BBj, the PRO/5 Data Server (if used), and/or the operating system.

Operating System Related Problems

When BBj is running in situations where many files are opened at the same time, a problem can occur where the operating system has reached its maximum number of allowed open file handles for the process. This problem manifests itself in a number of different ways, but most commonly in some kind of unexpected failure to open a file. On UNIX platforms, increasing or eliminating the limit on the number of file handles for a process resolves the problem. Typing the following at a shell prompt checks the current settings:

ulimit –a

The "open files" item displays the maximum number of files that can be opened simultaneously by a process. This value can be changed by calling ulimit with the –n option as shown in the following line:

ulimit –n 5000

PRO/5 Data Server Problems

To determine if the PRO/5 Data Server is being overloaded, check the log file for the following message: "pending queue full. rejected new connection!" This message means that the PRO/5 Data Server has rejected a connection because it was currently processing too many connection attempts. This problem may manifest itself as an EOF exception on the client (i.e. a BBj program, JDBC application, or ODBC application). To resolve the problem, use the –q option when starting the PRO/5 Data Server to increase the size of the pending queue beyond the default size of 5. For example, the following line starts the PRO/5 Data Server with a queue size of 25:

pro5.server –lmylogfile.log –p1100 –q25

BBj SQL Server Problems

Problems on the BBj SQL Server side will most likely manifest themselves with the following error message during a connection attempt:

"Unable to open socket connection. BBjServices may not be running on the host machine or the connection was rejected."

If the following statements are true, the BBj SQL Server may be flooded with too many simultaneous connection attempts:

  • The server is running on the expected port.

  • Most connection attempts are successful.

  • Subsequent connection attempts are still successful.

To improve the likelihood of a successful connection attempt, make a configuration change on each Windows client using the ODBC driver as follows:

1. Open up the configuration for the ODBC data source that you are using to connect.

2. Increase the "Max Connect Retries:" setting by 5 or 10.

3. Repeat #2 until the problem is resolved, or the number of retries seems to be unreasonable.