Restart

You can restart the connectivity agent if required.

  1. Stop the agent in either of the following ways:
    • If the agent is running as a normal process, press Ctrl+C on the command terminal window on which the agent is running, or search for the connectivity agent process and terminate it.
    • If the agent is running as an OS service, open the task manager and stop the oic_agent service.
  2. Wait at least 45 seconds before restarting the agent. This is because the agent monitoring framework waits for 45 seconds before marking the agent status as being down. If you start the agent before 45 seconds have completed, the agent restart fails with the following error message:
    Agent is already running for this particular instance.
  3. Restart the agent based on your environment and production load size.
    Environment Enter the Following Command

    Production environments

    To troubleshoot issues, it is recommended that you restart the agent with the -XX:+HeapDumpOnOutOfMemoryError parameter:
    java -XX:+HeapDumpOnOutOfMemoryError -jar connectivityagent.jar

    If the connectivity agent runs out of memory, this parameter by default ensures that the heap dump is stored in a java_pidpid.hprof file in the directory where the agent application is run.

    Based on production loads, it may sometimes be necessary to allocate a larger amount of heap size for the agent process. If you determine that the process must be allocated a larger heap size, tune the -Xms and-Xmx parameters accordingly.
    • Xms<Heap_minimum_size>G

    • Xmx<Heap_maximum_size>G

    For example, assume you want to assign a minimum of 2 GB and a maximum of 8 GB to the agent JVM.
    java -Xms2G -Xmx8G -jar connectivityagent.jar

    The -XX, -Xms, and -Xmxparameters can all be specified at the same time if needed.

    Nonproduction environments

    java -jar connectivityagent.jar