[CR #273087] In some circumstances,
ASE Replicator may shut down with a Java OutOfMemory
error.
This problem can occur when:
The value of the queue_size parameter is set too high for either a database connection or the ASE Replicator general configuration parameter. Sybase recommends that you use the default values.
A problem occurs on one or more connections where
data gets backed up in the queue. Depending on the size of the data,
the queue_size value for the affected
connection, and the amount of memory allocated to the Java virtual
machine (VM), a Java OutOfMemory
exception
can occur.
Workaround: If you encounter a Java OutOfMemory
error,
you can do either or both of the following:
Reduce the queue_size for each database connection and for the ASE Replicator general configuration.
Increase the amount of memory allocated to the Java VM by editing the -Xmx parameter in the aserep start-up script. The default is 64MB.
You can estimate the amount of memory to allocate to the Java VM for a particular queue_size value by evaluating the average size of a row of data in any table at each database connection, and factoring that value with the amount of memory available on the machine.
For each primary database connection:
Determine the average size (in bytes) of a row of table data replicated.
Multiply that value by the queue_size value for the connection, and add an overhead factor of 25 percent of the data size.
Multiply that number by the number of subscriptions that subscribe to data in a publication on the primary connection.
Find the average (or maximum) for all primary connections and multiply that number by the ASE Replicator queue_size setting. Add an overhead factor of 25 percent.
The sum of these numbers, plus approximately 32MB, should give you an estimate of the amount of memory required by the Java VM.
This amount of memory is required only in a worst-case scenario, in which the queues are filled with data.