Setting the value for MAX_HEAP in the file, server.bat, does not have the expected effect.

Setting the value for MAX_HEAP in the file, server.bat, does not have the expected effect.

book

Article ID: KB0094456

calendar_today

Updated On:

Products Versions
TIBCO DataSynapse GridServer -
Not Applicable -

Description

Description:
Setting a value for MAX_HEAP in a GridServer 6.2 installation does not have the expected effect when GS is run as a Windows service.
Symptoms:
The effect of increasing heap size in Gridserver is monitored by observing the maximum value written by DiagnosticsPlugin in the logs. For example:


05/05/16 10:30:50.422 INFO: [DiagnosticsPlugin] [M: 70M/123M/1166M] [T: D(3) O(91)] [6.1.1.34 (6.1.1_hotfix14)] [JRE: 1.7.0_79/Oracle Corporation] [OS: Windows 7/6.1/amd64] [H: ESLACK-LT] [TZ: +1:00]

Although the user can set the variable MAX_HEAP in server.bat file, GridServer does not start with the right value as the logs always show a maximum of 256M.



Cause:
This issue happens because in GridServer 6.2, the value for maximum heap has been hard coded as a fixed value for --JvmMx inside the DS_MANAGER\bin\service.bat file. Any new definitions of MAX_HEAP will be overridden by the default value of 256 (MB).

Resolution

A workaround for fixing this problem would be to do the following.

1). Go to the DS_MANAGER folder.


2). Stop the running service with the command "service.bat stop".


3). Uninstall the service with the command: "service.bat remove".


4). Go to the DS_MANAGER\bin folder and open the file "service.bat".


5). Search for the parameter JvmMx.


6). Set the required value  "--JvmMx NewValue". For example, to set 2048 MB write the following, without the trailing "m".

        --JvmMx 2048


7). Go back to the DS_MANAGER folder.


8). Install the Windows service with "service.bat install".


9). Start the GridServer as a service with "service.bat start".


Issue/Introduction

Setting the value for MAX_HEAP in the file, server.bat, does not have the expected effect.