Webservice does not restore itself after a ConnectionPoolTimeoutException
Our system uses a SOAP webservice to retrieve data. This webservice is called from a Scheduled event to connect every 15 seconds and is secured with a certificate. We use a timeout of 5 seconds. Sometimes the webservice we consume is offline due to technical issues or maintance. When the webservice is online again, the processing will be restored. Since a few months we notice that after the connection is lost it will not be properly restored. Other systems we have, which uses the same webservices, will continue to proces after the connection is restored. The mendix cloud environments we have will only restore the connection after the environment itself is restarted. I'm not exactly sure when this problem started, but we never had this issues with the Mendix 7.x versions. Currently we are using 8.4.2 We also noticed that the the connection sometimes is restored after it went offline, but it always fails to restore itself after we recieve the following exception: 16:19:50 com.mendix.modules.microflowengine.MicroflowException: java.security.PrivilegedActionException: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool Does anyone has similar experiences or pointers where to look?
We have a workaround for now, which seems to be to set the http.client.CleanupAfterSeconds (in the runtime settings) to a value that’s lower than the interval of your scheduled event.
In our case we do a check every minute, so we set it to roughly 58 seconds and we haven't had any issues since then.
For you a setting of 12-14 seconds might do the trick.
Mendix sent us the following in the ticket:
“How is the workaround working out for you?
We are happy to inform you that your request has been nominated for implementation in the 8.9.0 release. If all goes as expected, it will be released by the end of april. Do note that unforeseen circumstances can impact the planning.”
I’ve requested a description of what they’ll be adding to the release notes, as it is still unclear what the exact problem is and what Mendix will be fixing.
I’m sure Mendix had already sent you this workaround, but if not I hope this resolves your issue as well.