How can we modify the min/max heap settings for this agent ?We dont want to rebuiild the agent.
Looking at the startup scripts we can see that the min/max values can be passed as params, but how to do this ?
As we have a large estate the agent is crashing due to default heap of 16/256 being too small
./APMIAgent.sh startwithlogs: APM Infrastructure Agent started
APM Infrastructure Agent Start is Completed
Tue Apr 10 11:41:45 UTC 2018 [INFO] APM Infrastructure Agent Start is Completed
4/10/18 11:41:51 AM UTC [INFO] [IntroscopeAgent.OSEMetadataInfo] Operation Name = null
4/10/18 11:41:58 AM UTC [INFO] [IntroscopeAgent.IntelligentInstrumentationService] Intelligent Instrumentation Service activated
4/10/18 11:42:43 AM UTC [ERROR] [IntroscopeAgent.InfrastructureAgent Agent] Error on getting last deployment status for heapster
4/10/18 11:42:48 AM UTC [INFO] [IntroscopeAgent.InfrastructureAgent Agent] AutoProbe has reloaded all directive configuration. This is because a change to a directive configuration file was detected.
4/10/18 11:43:02 AM UTC [ERROR] [IntroscopeAgent.OutgoingRouteConnector] Closing outgoing route connector due to unrecoverable error.
java.lang.OutOfMemoryError: GC overhead limit exceeded
4/10/18 11:43:02 AM UTC [ERROR] [IntroscopeAgent.InfrastructureAgent Agent] The thread named "UnknownHub Hub Transmit 2" has unexpectedly terminated because of java.lang.OutOfMemoryError GC overhead limit exceeded
4/10/18 11:43:09 AM UTC [ERROR] [IntroscopeAgent.InfrastructureAgent Agent] The thread named "Thread-3" has unexpectedly terminated because of java.lang.OutOfMemoryError GC overhead limit exceeded
The pod remains Running. We have attempted a couple of restarts, all produce the same results.
When reviewing the container, I can see the /usr/local/openshift/apmia/run.sh calls apmia-ca-installer.sh which in turn call bin/APMIAgent.sh
APMIAgent.sh takes default min/max heap from within the script as it expects them to be passed as arguments when being executed ($2 and $3)
Is it possible to set these as ENV variables?
Hi Dave,
Funnily enough I was looking at the same thing for the collector agent. Yes you can is the answer
If you define a couple of variables MIN and MAX than call teh script with them as follows
# export MAX=512
# export MIN=128
./*sh start $MIN $MAX
Starting /collectors/CollectorAgent-10.5.2/jre/bin/java -server -Xms128m -Xmx512m -cp lib/CollectorAgent.jar:lib/gson.jar:lib/Agent.jar -XX:ErrorFile=/collectors/CollectorAgent-10.5.2/logs/jvm_error.%p.log com.wily.introscope.agent.collector.CollectorAgent
./CollectorAgent.sh start: CollectorAgent (pid 15426) started
If they are not set and you still call it with those arguments it just uses the default as the $2 $3 are missing
# unset MIN
# unset MAX
# ./*sh start $MIN $MAX
Starting /collectors/CollectorAgent-10.5.2/jre/bin/java -server -Xms16m -Xmx256m -cp lib/CollectorAgent.jar:lib/gson.jar:lib/Agent.jar -XX:ErrorFile=/collectors/CollectorAgent-10.5.2/logs/jvm_error.%p.log com.wily.introscope.agent.collector.CollectorAgent
./CollectorAgent.sh start: CollectorAgent (pid 15478) started
hope this helps
cheers
Mike