Issue while deploying BDM in Bonita studio
We have around 50+ processes deployed on our local Bonitasoft 7.5.4 server. After I deploy all the processes, if I try to deploy a BDM change, the local H2 instance is throwing Out of Memory error as shown below and after this error, when I try to launch the portal a 500 error is being thrown and the only way to come out of this is to delete the local Bonita database file(bonita_journal.db.h2.db) which deletes all the deployed process. Hence, this has become a deadlock to us.
Any in-sight in to this problem is highly appreciated.
Below are prominent logs to my observation:
org.hibernate.engine.jdbc.spi.SqlExceptionHelper Out of memory.; SQL statement:
select sdependenc0_.tenantid as tenantid1_22_, sdependenc0_.ID as ID2_22_, sdependenc0_.name as name3_22_, sdependenc0_.description as descript4_22_, sdependenc0_.fileName as fileName5_22_, sdependenc0_.value_ as value_6_22_ from dependency sdependenc0_ where ? = sdependenc0_.tenantid and (sdependenc0_.ID in (? , ? , ? , ? , ? , ? , ?)) order by sdependenc0_.ID ASC limit ? [90108-175]
2018-07-19 23:59:05.898 +0530 SEVERE: org.bonitasoft.engine.scheduler.impl.BonitaJobStoreCMT Couldn't rollback jdbc connection. The database has been closed [90098-175]
org.h2.jdbc.JdbcSQLException: The database has been closed [90098-175]
org.bonitasoft.engine.scheduler.impl.BonitaJobStoreCMT MisfireHandler: Error handling misfires: Failed to obtain DB connection from data source 'notManagedDS': java.sql.SQLException: Could not retrieve datasource via JNDI url 'java:comp/env/bonitaSequenceManagerDS' org.h2.jdbc.JdbcSQLException: Database may be already in use: "Server is running". Possible solutions: close all other connection(s); use the server mode; SQL statement:
[See nested exception: java.sql.SQLException: Could not retrieve datasource via JNDI url 'java:comp/env/bonitaSequenceManagerDS' org.h2.jdbc.JdbcSQLException: Database may be already in use: "Server is running". Possible solutions: close all other connection(s); use the server mode; SQL statement:
H2 should be used only for development purpose. Do you really need to keep 50+ processes at a time?
This being said, I cannot think of any relation between the number of deployed processes and BDM deployment issue. How big (structure and data) was your BDM DB when this happened?
A workaround could be to temporally increase the JVM memory for such an action.