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?
3 answers

Hi Stefan,

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.


Hm, that is about the connection from Mendix runtime to the database. http://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/conn/ConnectionPoolTimeoutException.html

You will have to look for the connection manager. There is information about the settings in paragraph

4.2 Connection Pooling of https://docs.mendix.com/refguide/custom-settings


Hi Stefan,

Have you been able to find the cause of this? We're experiencing the same issue and have no idea where to look.

  • We monitor other Mendix applications using a SE that runs every minute. Application A runs fine and we receive a proper response every minute.
  • Application A was restarted, which throws an expected “503: Service Unavailable” once.
  • After the restart is completed, we would normally be able to reach the endpoint again, but as it is now we only get “ConnectionPoolTimeoutException” errors every minute.
  • If we reset our monitoring app, the connection can be restored and all is well in the world.

Hopefully you are a lot further in your investigation than we are ;)