4.3.3. Resin Configuration¶
4.3.3.1. Standalone/Distributed Configuration Common¶
Open <%RESIN_HOME%/conf/resin.properties> file.
To the [jvm_args] property, please set the memory value and the maximum heap size that match with the installation environment.In this document following values are set as an example.# Arg passed directly to the JVM jvm_args : -Xmx1024m -XX:MaxPermSize=256mWarning
The value to be set should be [1024m] or greater.If the value smaller than [1024m] is set, functions may not be performed correctly.Note
You can add [-Djava.io.tmpdir] option to [jvm_args] property, and change the work directory used by Resin.If this option has not been specified, the work directory which is used by Resin will be the default setting of JVM.Example below shows the setting by which work directory is changed to /var/resin-tmp.# Arg passed directly to the JVM jvm_args : -Xmx1024m -XX:MaxPermSize=256m -Djava.io.tmpdir=/var/resin-tmpWarning
It is necessary that the directory specified by the [-Djava.io.tmpdir] option should have been created in advance.It is also necessary to make the authorization settings to allow Resin execution users to do the read and write operations.If this option has not been specified in the Linux environment, /tmp will be used.Sometimes depending on the setting of cron etc., the setting to periodically delete the contents under /tmp may have been incorporated as standard.On Resin if the changes are detected in the configuration file that is expanded to the work directory, automatic restart may take place.Therefore, it is recommended that the work directory to be used by Resin has been changed in advance.Note
You can add [-Duser.timezone] option to [jvm_args] property, and change the time zone.Time zone to be set should be the one that exists in Time Zone Master.For the Time Zone Master, please refer to [Configuration File Reference Time Zone Master].In this document time zone is set to “UTC” as an example.# Arg passed directly to the JVM jvm_args : -Xmx1024m -XX:MaxPermSize=256m -Duser.timezone=UTCNote
Initial setting of time zone setting depends on JDK to which installation has been made.
Warning
This setting should be made before the systems operations start.If the time zone is changed after systems operations started, mismatch of date/time data would occur.Note
If Resin detects the change of configuration file or change of programs after it is started, it will restart itself.If you do not want Resin to detect these changes during development or during operations depending on the usage of the systems, you should set the [dependency_check_interval] item.Following example shows the case in which change detection is suppressed.dependency_check_interval : -1You can set such values like 2s (every 2 seconds) or 5m (every 5 minutes) to [dependency_check_interval].
After the change is completed, Resin should be restarted.
Note
If the port duplication error occurs when Resin is started, please change the port number setting after Resin is stopped.
java.lang.RuntimeException: java.net.BindException: Address already in use: JVM_Bind Can't bind to *:8080. Check for another server listening to that port.Please change the value [8080] which is set in [app.http] property to unused port number such as [8081].
# Set HTTP and HTTPS ports. # Use overrides for individual server control, for example: app-0.http : 8081 app.http : 8081After the change is completed, Resin should be restarted.
4.3.3.2. Distributed Configuration¶
Open <%RESIN_HOME%/conf/resin.properties> file.
Set to [app_servers] property the Resin server information which is built as a distributed configuration.
As an example, if Resin is to be operated in 3 units configuration, following values should be set.# app-tier Triad servers: app-0 app-1 app-2 app_servers : 192.168.100.1:6800 192.168.100.2:6800 192.168.100.3:6800IDs app-0, app-1, and app-2 are assigned in the stated sequence to [IP Address: Port Number] that are set to [app_servers] property.Warning
Please set the same contents to all <%RESIN_HOME%/conf/resin.properties> files of Resin that are included in the distributed configuration.Only the local address can be specified as an IP address specified to the [app_servers] property. Global address cannot be specified to it.In case distributed environment is built, it does not function properly if the loop back address such as 127.0.0.1 is specified.