We're updating the issue view to help you get more done. 

Add option so GSA will try to restart service several time,(and not just never or always)

Description

For instance GSC_JAVA_OPTIONS contain wrong syntax of VM option
or regex exception keeps occurring,or memory issues- the gs-agent try to restart it forever and consume high cpu
in addition we can expose the retry time interval.

  • 95-100 percent CPU usage when using double dash in command line arguments.
    Step to reproduce
    cd {gsFolder}\bin
    SET GSC_JAVA_OPTIONS=--Dcom.gs.zones=ZONE1,ZONE2
    gs-agent.bat

In the stdout/stderr the following is seen: (this is not visible in the logs! with log level Finest/Trace).
[gsc][2/] Error: Could not create the Java Virtual Machine.
[gsc][2/] Error: A fatal exception has occurred. Program will exit.
[gsc][2/] Unrecognized option: --Dcom.gs.zones=ZONE1,ZONE2

Notice that i used – (doube dash) in the command line args instead of - (single dash).
But GSA keeps consuming 100% CPU with this arguments.
GSA maybe should stop or at least write this failure into the logs.

Workaround

None

Acceptance Test

None

Status

Assignee

Unassigned

Reporter

Yuval Dori

Labels

Priority

Medium

SalesForce Case ID

9673,9158, 11423,12200

Fix versions

None

Commitment Version/s

None

Due date

None

Product

None

Edition

Open Source

Platform

Java