With Blueriq 11.8, we changed the implementation of the AQ_RestServiceClient service call to use the Spring Framework's RestTemplate instead of the implementation provided by the SDK. The new Spring implementation defaults to using the HttpsUrlConnection from the Java SDK for performing HTTP requests.

This implementation has a limit of 5 for the number of simultaneous requests that can be done to the same host.

This means that in several scenarios, this limit can be hit, for example:

  • Multiple Rest calls to the same runtime because of decoupling patterns
  • A lot of simultaneous users in a model that contains a lot of Rest calls
  • The model contains Rest calls to endpoints that take long to respond

Symptoms

When the limit is hit, you'll notice that Rest calls will wait on a free connection to be available, which could take an indefinitely amount of time if Rest calls are waiting for each other, or it could take as long as a Rest call requires to finish before the next call can start.

Solution

The limit can be adjusted to add a JVM parameter to the application server that hosts the runtime:

... -Dhttp.maxConnections=20

Setting this property to a higher number will allow more simultaneous connections to the same host.

It's hard to predict a proper value, because this depends on the expected number of simultaneous users, the frequency that AQ_RestServiceClient calls are performed to the same host and the amount of decoupling by using BAARS calls for your project.

Our general advice would be to increase this setting as you expect more users and/or if there are a lot of AQ_RestServiceClient service calls to the same host is your project. 

As the circumstances are highly dependent on the project, we cannot give an exact number. A performance test with the expected number of users may give some insights. You can try with different values and see whether the limit is hit. Alternatively, you can set the value to a high number, e.g. 500. However, this could impact memory and/or network resources. Please test whether the setting you selected works for your project before going live!