The connection_timeout feature does not check whether the connection is truly idle before it kills it. Sessions that are actively performing some operation and are waiting for a result should be left alone.
If using read/write split service and connection_timeout is set in service, if one of the connections on replica servers times out, it kills the master connection too, even if it has a valid transaction running and therefore is not idle.
Connect to maxscale with connection_timeout set to 30 seconds and execute the following:
As you can see this transaction is killed by maxscale every time.