Licenses in Docker image of IRIS (store/intersystems/iris:2019.2.0.107.0-community)
Hi! I am working in a java project (Spring Boot+ Maven + Hibernate) using jpa/hibernate to manage the persistance with the IRIS database from the Docker image (store/intersystems/iris:2019.2.0.107.0-community) and I've found an issue using the IRIS instance, when I define tables with relationships OneToMany, ManyToOne or ManyToMany and I try to fetch all the rows of the tables using the default method findAll (JpaRepository implements that method to get all the rows by default) the query automatically exceeds the limit of licenses availables. I've tested the same query using a local IRIS instance with a regular license (InterSystems IRIS 2018.1 Enterprise - Concurrent Users for x86-64 (Microsoft Windows):250, Non-Production Instance) and works perfectly.
Could be possible increase the number of licenses availables for the IRIS image in Docker?
Thank you in advance!
I think the limit is 5 concurrent users. Anyone can confirm?
Yes, it is, but in this case, it exceeded connections limit for one license unit and it is even just only 4 in comparing with 25 for ordinary versions.
And I think this message in the log should be changed to be more clear.
Another issue, here
25 connections for ordinary version, but Community Edition, has only 4 connections and fails to start more.
And another problem is that reaching connections limit for just one user, changes state of the instance as with warn
And this state used for HEALTHCHECK of the container, so, this container became as Unhealthy, which means in production such container should be killed, even it is actually in good condition.
Hi Dmitry, It's true, it's not a problem of licenses, it's a problem of connections:
Before the select: only 1 connection used.
When the project execute the findAll query: Connections used = 5
It seems like a problem with the connection pool manager, it reserves connections for each query and when the connections achieve the maximum the execution is blockade.
I don't see any realation between license capacity and how you describe you use it. Is it possible to get some reproducible excerpt which would prove what you said?
Could you share your Java code?
Sure! You have it available here:
https://github.com/es-comunidad-intersystems/webinar-multimodelo/tree/master/jdbc-jpa-rest
It's a MAVEN project so you only need MAVEN installed in your PC and modify the actions.properties to define the parameters to access to the database.
so, my application.properties
in this case, I have only 4 connections on the server, without any issues with licenses
Hi Warlin! thank you for your answer, I tried modifying the connection pool size to 1, 2 and 3 and the problem continued.
Which value did you modify?
The pool size takes couple values into account.
Which connection pooling are you using? If using default boot one it's Hikari and the value to change should be maximumPoolSize
I've modified spring.datasource.hikari.maximumPoolSize values (with differents values 1, 2, 3 and 4) and when the application execute a findAll or a query without the clause WHERE the execution is blockade.
In theory there are 2 free connections but the error returned is:
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
The default value for connection pool size on boot is usually 10. You may want to set this value to 1 or 2 for testing purposes (if using the IRIS community version).