4
votes

We have problems in cygnus. It is appearing this error in the log.

java.lang.OutOfMemoryError: Java heap space

We have changed the memory assigned to cygnus but we do not know if it is correct. The file modifcated is /usr/cygnus/bin/cygnus-flume-ng

################################
# main
################################

# set default params
FLUME_CLASSPATH=""
FLUME_JAVA_LIBRARY_PATH=""
####JAVA_OPTS="-Xmx20m"
JAVA_OPTS="-Xmx512m"
LD_LIBRARY_PATH=""

Could someone please tell us if it is produced by other possible error?

1

1 Answers

0
votes

The proper place for setting the Java heap space is /usr/cygnus/conf/flume-env.sh. There should be a template file for that (sufixed as .template), with an option already commented:

#JAVA_OPTS="-Xms100m -Xmx200m -Dcom.sun.management.jmxremote"

Simple uncomment it and set Java options you need (the default values are just an example).