Out of memory errors when processing messages or a non-responsive MirthConnect service indicates that amount of heap memory allocated to the service is not enough for the amount of traffic. The standard allocation is 256m but for high traffic sites the recommendation is 1G. The steps for making this change are below. Once the heap memory allocation is increased the MirthConnect service has to be restarted for the changes to take effect.
[estuck@ovmirtha ~]$ cd /opt/mirthconnect
[estuck@ovmirtha mirthconnect]$ ls -l
total 1676
drwxr-xr-x 3 mirth mirth 4096 Jul 22 2013 appdata
drwxrwxr-x 2 mirth mirth 4096 Jul 30 04:02 backups
-rw-r–r– 1 apardue apardue 112 Oct 26 2013 ccd-trigger.xml
-rw-r–r– 1 mirth mirth 177 Aug 13 2013 CheckEnv.cmd
-rwxr-xr-x 1 mirth mirth 177 Aug 13 2013 CheckEnv.sh
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 client-lib
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 cli-lib
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 conf
drwxr-xr-x 2 mirth mirth 4096 Mar 12 10:55 config
drwxr-xr-x 4 mirth mirth 4096 Aug 13 2013 custom-lib
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 docs
drwxrwxr-x 32 mirth mirth 4096 Aug 13 2013 extensions
-rw-r–r– 1 mirth mirth 178 Aug 13 2013 FDBMappingReport.cmd
-rwxr-xr-x 1 mirth mirth 172 Aug 13 2013 FDBMappingReport.sh
-rw-r–r– 1 mirth mirth 199 Aug 13 2013 FormularyReport.cmd
-rwxr-xr-x 1 mirth mirth 192 Aug 13 2013 FormularyReport.sh
-rw-r–r– 1 mirth mirth 126 Feb 13 2013 GenerateImageInterfaceTransformer.cmd
-rwxr-xr-x 1 mirth mirth 127 Feb 13 2013 GenerateImageInterfaceTransformer.sh
-rw-r–r– 1 mirth mirth 11424 Feb 13 2013 HowTo-CreateTemplateFiles.txt
drwxrwxr-x 17 mirth mirth 4096 Aug 13 2013 imaging
-rw-r–r– 1 mirth mirth 9986 Feb 13 2013 ImagingReadMe.txt
drwxrwxr-x 6 mirth mirth 4096 Jul 22 2013 java
drwxr-xr-x 6 mirth mirth 4096 Jan 3 2014 LaHIE
drwxrwxr-x 6 mirth mirth 4096 Jul 22 2013 lib
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 licenses
drwxr-xr-x 2 mirth mirth 16384 Jul 30 07:16 logs
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 manager-lib
-rwxrwxr-x 1 mirth mirth 10229 Feb 28 2012 mccommand
-rwxrwxr-x 1 mirth mirth 10341 Feb 28 2012 mcmanager
-rwxrwxr-x 1 mirth mirth 10358 Feb 28 2012 mcserver
-rw-rw-r– 1 mirth mirth 42 Feb 28 2012 mcserver.vmoptions
-rwxrwxr-x 1 mirth mirth 19149 Jul 22 2013 mcservice
-rw-rw-r– 1 mirth mirth 42 Feb 28 2012 mcservice.vmoptions< This file needs edited.
-rw-rw-r– 1 mirth mirth 23118 Feb 28 2012 mirth-cli.jar
-rw-rw-r– 1 mirth mirth 5365 Feb 28 2012 mirth-cli-launcher.jar
drwxrwxr-x 4 mirth mirth 4096 Jul 22 2013 mirthdb
-rw-rw-r– 1 mirth mirth 7663 Feb 28 2012 mirth-launcher.jar
-rw-rw-r– 1 mirth mirth 68912 Feb 28 2012 mirth-manager.jar
-rw-rw-r– 1 mirth mirth 1330445 Feb 28 2012 mirth-server.jar
-rw-r–r– 1 mirth mirth 144 Feb 13 2013 PrintImageInterfaceVersion.cmd
-rwxr-xr-x 1 mirth mirth 144 Feb 13 2013 PrintImageInterfaceVersion.sh
-rw-r–r– 1 mirth mirth 822 Apr 30 2013 print-pricing-version.bat
-rwxr-xr-x 1 mirth mirth 613 Apr 30 2013 print-pricing-version.sh
drwxrwxr-x 2 mirth mirth 4096 Jul 22 2013 public_html
-rwxrwxr-x 1 mirth mirth 6728 Jul 2 2013 setup-mysql.sh
drwxr-xr-x 2 mirth mirth 4096 Jun 23 14:52 temp
-rw-r–r– 1 mirth mirth 123 Feb 13 2013 ValidateImageInterfaceConnection.cmd
-rwxr-xr-x 1 mirth mirth 123 Feb 13 2013 ValidateImageInterfaceConnection.sh
-rw-r–r– 1 mirth mirth 137 Feb 13 2013 ValidateTemplateFile.cmd
-rw-r–r– 1 mirth mirth 134 Feb 13 2013 ValidateTemplateFile-console.cmd
-rwxr-xr-x 1 mirth mirth 134 Feb 13 2013 ValidateTemplateFile-console.sh
-rwxr-xr-x 1 mirth mirth 138 Feb 13 2013 ValidateTemplateFile.sh
[estuck@ovmirtha mirthconnect]$ more mcservice.vmoptions
-server
-Xmx256m < This line needs edited to increase to 1G—should look like this Xmx1G.
-Djava.awt.headless=true
Then stop/start the MirthConnect Service so the new settings can take effect.
[estuck@ovmirtha ]$ sudo service mirthconnect stop
estuck@ovmirtha ]$ sudo service mirthconnect start
1903 Wright Place, Suite 120
Carlsbad, CA 92008
Toll-Free (877) 633-7743
Email customercare@medsphere.com