Configuring M3 timeouts
If the M3 BE server is unavailable, an error message is shown, but if the connection is terminated because of a timeout or for some other reason (server reboot, among others) the e-Commerce application tries to reconnect. This occurs transparently to the user.
Some M3 BE installations are configured to drop the API connection after a specific period of inactivity. On an RPG server, the M3 API is set to timeout after 60 minutes by default — on a Java server the timeout is configurable.
e-Commerce connections to M3 RPG have two kinds of timeout - aged timeout and unused timeout:
-
Aged Timeout determines when a physical connection is discarded based on the time since the connection was created, and in principle it should not be necessary to set it.
-
Unused Timeout determines when a unused or idle connection is discarded based on the time since the connection was last used.
The accuracy of both the Aged Timeout and the Unused Timeout are affected by an interval known as the Reap Time, which is the interval between runs of the "pool maintenance thread". When the pool maintenance thread runs, it discards any connections remaining unused for longer than the time value specified in Unused Timeout, until it reaches the number of connections specified in Min Connections. The pool maintenance thread also discards any connections that remain active longer than the time value specified in Aged Timeout.
The sum of the Unused Timeout and the Reap Time settings must be lower than the FPW Timeout, in order to make sure that connections are not reused if they have been closed by M3 BE.
The Reap Time is set to 60 secs and the Unused Timeout is set to 1800 secs by default.
For a full description of IBM WebSphere’s timeout settings for pooled connections (which e-Commerce applications use) see:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.doc/info/aes/ae/udat_conpoolset.html
In the default connector setup, connections to the API are never closed, which implicitly assumes that the M3 server never closes them either. However, if you wish to use a timeout on your M3 server, you need to configure the connection timeout on WebSphere.