# Why app cannot kill with PID after add APM config options

**URL:** <https://discuss.elastic.co/t/why-app-cannot-kill-with-pid-after-add-apm-config-options/375363>\
**Category:** APM\
**Tags:** java\
**Created:** [March 4, 2025, 10:31am UTC](https://discuss.elastic.co/t/why-app-cannot-kill-with-pid-after-add-apm-config-options/375363 "2025-03-04T10:31:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baber1223](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baber1223/32/83533_2.png) [@baber1223](https://discuss.elastic.co/u/baber1223)\
**Post date:** [March 4, 2025, 10:31am UTC](https://discuss.elastic.co/t/why-app-cannot-kill-with-pid-after-add-apm-config-options/375363/1 "2025-03-04T10:31:26Z")

</div>

Since I have added follow option to my jave app to gather and send info to APM , I cannot kill the app with PID and it automatically start again with new pid . Does it relalates to my follow option ? What should I do now ?

```auto
JAVA_OPTS="$JAVA_OPTS -javaagent:/usr/agent/elastic-apm-agent.jar -Delastic.apm.service_name=TEST-Delastic.apm.server_url=http://IPAddress:8200 -Delastic.apm.transaction_sample_rate=0.2 -Delastic.apm.metrics_interval=30s -Delastic.apm.capture_body=off -Delastic.apm.capture_headers=false"

```

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [March 4, 2025, 11:39am UTC](https://discuss.elastic.co/t/why-app-cannot-kill-with-pid-after-add-apm-config-options/375363/2 "2025-03-04T11:39:05Z")

</div>

The agent does not install any signal handlers, nor is it capable of restarting the JVM. Not being able to kill and automatic restart is not related to the agent
