Running out of memory

If you are running out of memory, you will get the following error message:

java.lang.OutOfMemoryError

When you are running out of memory, the Mirror Replication Agent drops out of Replicating state, or the entire Mirror Replication Agent server may stop executing.

To support adjusting the amount of memory available to the JRE, all of the executable scripts (or batch files) in the Mirror Replication Agent bin directory refer to an environment variable named RA_JAVA_MAX_MEM.

All Mirror Replication Agent instance RUN scripts also reference the RA_JAVA_MAX_MEM environment variable.

You can adjust the amount of memory available to the JRE by either:

If you start a Mirror Replication Agent instance by invoking the ra utility, you can set the value of the RA_JAVA_MAX_MEM system variable in your environment to specify the amount of memory available to the JRE. Before it sets the RA_JAVA_MAX_MEM variable to a default value, the ra and ra_admin utilities check to see if it is already set.

If you start a Mirror Replication Agent instance by invoking the instance RUN script (or batch file), you can edit the instance RUN script to change the default value of RA_JAVA_MAX_MEM and specify the amount of memory available to the JRE.

NoteWhen a Mirror Replication Agent instance is started with the instance RUN script, the value of the RA_JAVA_MAX_MEM variable specified in the RUN script overrides the value set elsewhere. Therefore, you can edit the RUN script to adjust the memory available to the JRE for each instance.

Debugging LTL

LTL (Log Transfer Language) is the syntax used to communicate or distribute replication data to Replication Server. It is the principle output from a Mirror Replication Agent. For more details about LTL syntax, see the Replication Server Design Guide.

StepsTo debug LTL

  1. Log in to the running Mirror Replication Agent instance using the administrator login.

  2. Use the ra_status command to verify that the Mirror Replication Agent instance is in Admin state:

    ra_status
    
  3. Use the ra_config command to set the values of the following Mirror Replication Agent configuration parameters for the primary database:

    ra_config LITTRACELTL, true
    
  4. Use the resume command to change the Mirror Replication Agent state to Replicating:

    resume
    
  5. When new replication activity is generated, check the LTITRACELTL.log file in the log directory to debug your problem.

Once new activity is generated, check the LTITRACELTL.log file in the log directory to debug your problem.

Uncompressing LTL for debugging a problem

By default, the LTL generated by the Mirror Replication Agent is compressed to reduce the amount of data sent to Replication Server, reducing network bandwidth. In cases where you require more verbose output to help debug a problem, change the following configuration parameters to produce more verbose LTL.

StepsTo produce more verbose LTL

  1. Log in to the running Mirror Replication Agent instance using the administrator login.

  2. Use the ra_status command to verify that the Mirror Replication Agent instance is in Admin state:

    ra_status
    
  3. Use the ra_config command to set the values of the following Mirror Replication Agent configuration parameters for the primary database:

    ra_config column_compression = false

    ra_config compress_ltl_syntax = false

    ra_config structured_tokens = false

  4. When new replication activity is generated, check the LTITRACELTL.log file in the log directory to debug your problem.