Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

java.net.SocketException - Too many open files in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.net.SocketException - Too many open files in

    Hi,
    I have a Mirth 1.5 running on linux - gentoo whith two channels; all worked fine until this morning, when I tried to add a third channel. This third channel has a database reader - as the first - which connnects to the same database as the first one: same machine, same port, same user /pwd.
    So, with this third added channel, i have the following exception:

    Code:
    ERROR 2008-02-15 10:34:05,434 [RMI TCP Connection(10)-127.0.0.1] org.mule.impl.model.seda.SedaModel: Error starting component [c924d224-9faa-4ed0-b95e-c53edf982051] 
    org.mule.umo.provider.ConnectorException: There is already a listener registered on this connector on endpointUri: vm://c924d224-9faa-4ed0-b95e-c53edf982051. Connector that caused exception is: [email protected]
    ERROR 2008-02-15 10:44:14,626 [9e646282-4b5b-4970-b515-1bc2ecd00171_source_connector._jdbcEndpoint#-785450342.receiver.2] com.webreach.mirth.server.mule.providers.jdbc.JdbcMessageReceiver: Error in the ACK sentence of the JDBC connection, but the message is being sent anywaycom.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 
    
    ** BEGIN NESTED EXCEPTION ** 
    
    java.net.SocketException
    MESSAGE: Too many open files in system
    
    STACKTRACE:
    
    java.net.SocketException: Too many open files in system
    	at java.net.Socket.createImpl(Socket.java:388)
    	at java.net.Socket.<init>(Socket.java:361)
    	at java.net.Socket.<init>(Socket.java:208)
    	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)
    	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:268)
    	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2745)
    	at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
    	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
    	at java.sql.DriverManager.getConnection(DriverManager.java:525)
    	at java.sql.DriverManager.getConnection(DriverManager.java:171)
    	at com.webreach.mirth.server.mule.providers.jdbc.JdbcConnector.getConnection(JdbcConnector.java:451)
    	at com.webreach.mirth.server.mule.providers.jdbc.JdbcMessageReceiver.processMessage(JdbcMessageReceiver.java:136)
    	at org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.doInTransaction(TransactedPollingMessageReceiver.java:159)
    	at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:72)
    	at org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.run(TransactedPollingMessageReceiver.java:149)
    	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
    	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    	at java.lang.Thread.run(Thread.java:595)
    It seems that I cannot have two database reader channels on the same mirth server simultaneously connecting to the same database, user and port. I thought that these two connection would represent two different threads,without problems like this.
    Maybe also interesting the fact that in the first channel I make some connections to the same database on the same port via code, inside the transformer, - and all works fine.

    Is there a way to easly solve this issue, without using another mirth server?

    thanks and regards,
    Alessandro

  • #2
    Re:java.net.SocketException - Too many open files

    This exception is caused because the max open files limit of the OS is reached. You can change the limit using the "ulimit" command in the .bash_profile of the user running Mirth, changing the limit throught the /proc filsystem, or the /etc7limits.conf file.

    I've found this exception with many Jboss/Oracle setup, when the database connection pool was setup too high.

    Hope that helps.

    Comment

    Working...
    X