This subsection describes how to prevent the errors that might occur when you create a large-scale system depending on the network environment.
You should control RPCs of OpenTP1 using a smaller value for the timer monitoring value of TCP/IP than the timer value set in the operating system. If you use a network with a low transmission efficiency, such as communication with a remote site via a WAN, a communication failure may occur.
In this case, the user can prevent this problem by specifying the following operands in the system common definition, the user service definition, and the user service default definition.
set ipc_conn_interval=length-of-time-to-wait-until-the-connection-is-established
set ipc_send_interval=interval-of-data-transmission-monitoring
set ipc_send_count=number-of-times-of-data-transmission-monitoring
set ipc_header_recv_time=length-of-time-to-wait-until-the-
communication-control-data-is-received
set ipc_backlog_count=length-of-queue-storing-connection-establishment-requests
- Specifying the length of time to wait until the connection is established
When a connection with the send destination process is not established, OpenTP1 calls the connect() system call of TCP/IP. If the connection cannot be established immediately and the socket is in the nonblocking mode, OpenTP1 uses the select() system call to monitor the connection until it receives the event of connection establishment completion from TCP/IP.
By specifying the ipc_conn_interval operand, you can specify the length of the monitoring time until OpenTP1 receives the event of connection establishment completion from TCP/IP.
- Specifying the interval of data transmission monitoring and the number of times of data transmission monitoring
After the connection is established, OpenTP1 uses the write() system call to write send data into the TCP/IP communication buffer.
The system may not be able to write data into the TCP/IP communication buffer and the write() system call may be retried if:
- Packets are frequently lost because of poor transmission quality of the network using a WAN.
- You send data larger than the TCP/IP communication buffer.
By specifying the ipc_send_interval operand, you can specify the interval of monitoring data transmission of the write() system call.
By specifying the ipc_send_count operand, you can specify the number of times data transmission is to be monitored for the write() system call.
- Specifying the length of time to wait until the communication control data is received
If you cannot receive the communication control data of OpenTP1 due to an error in the network after you start to receive data, you cannot start the connection setting requests from other processes or start to receive new data for a while.
By specifying the ipc_header_recv_time operand, you can check the time until the communication control data is received.
- Specifying the length of queue storing connection establishment requests (listen queue)
OpenTP1 issues the listen() system call to a socket which receives a connection establishment request. In the listen() system call, SOMAXCONN defined by the OS in which OpenTP1 was compiled is specified as the listen queue length. For details about the SOMAXCONN value, see the Release Notes. If a large number of connection establishment requests are received at the same time, the listen queue may run short and the connection establishment requests may return errors. By specifying the ipc_backlog_count operand in the system common definition, you can change the length of the listen queue. The maximum value that can be specified as the listen queue length and the SOMAXCONN value depend on the OS. If you want to specify a value greater than the value of SOMAXCONN for the OS in the ipc_backlog_count operand, check these values in the OS documentation, and make sure that the values you specify are appropriate.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.