{"id":13470,"date":"2018-02-12T09:28:23","date_gmt":"2018-02-12T16:28:23","guid":{"rendered":"https:\/\/ephesoft.com\/docs\/?p=13470"},"modified":"2021-01-29T13:00:17","modified_gmt":"2021-01-29T20:00:17","slug":"maximum-mariadb-connections","status":"publish","type":"post","link":"https:\/\/ephesoft.com\/docs\/maximum-mariadb-connections\/","title":{"rendered":"Maximum MariaDB Connections"},"content":{"rendered":"
The following error may occur when trying to establish a connection to MariaDB in the multi-server environment:<\/span><\/p>\n As an example, let\u2019s take the multi-server environment that includes three servers. In this case, the number of connections that can be established with the default server.xml<\/strong> configuration will be as follows:<\/span><\/p>\n By default, MariaDB supports up to 150 connections at a time. That means this error can occur if Ephesoft Transact tries to open more connections than the limit set by the database.<\/span><\/p>\n There are two approaches to handle this problem:\u00a0<\/span><\/p>\norg.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection : Too many Connections open<\/span><\/pre>\n
Background<\/strong><\/span><\/h3>\n
\n
Solution<\/strong><\/span><\/h2>\n
\n
maximumPoolSize<\/code> attribute of the\u00a0
Resource<\/code> tag can be configured as needed to restrict Ephesoft Transact from opening a higher number of connections.<\/span><\/li>\n<\/ol>\n