# Slow to stop metricbeat Windows service

**URL:** <https://discuss.elastic.co/t/slow-to-stop-metricbeat-windows-service/188466>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 2, 2019, 9:37am UTC](https://discuss.elastic.co/t/slow-to-stop-metricbeat-windows-service/188466 "2019-07-02T09:37:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomkirk](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tomkirk](https://discuss.elastic.co/u/tomkirk)\
**Post date:** [July 2, 2019, 9:37am UTC](https://discuss.elastic.co/t/slow-to-stop-metricbeat-windows-service/188466/1 "2019-07-02T09:37:28Z")

</div>

Hello,

I'm installing metricbeat as a Windows service. I'm not using the supplied powershell files but rather doing it via WinSVC in C/C++. This start up and runs fine. When I want to update the files I'm stopping the service, then copying the new files over and starting again.

The issue I'm seeing is that I can't overwrite metricbeat.exe for up to 30 seconds after requesting the service to stop. I'm just launching the service with the -c argument, metricbeat.yml is below:

metricbeat.config.modules:  
path: ${path.config}/modules.d/\*.yml  
reload.enabled: false  
reload.period: 1m  
setup.template.settings:  
index.number\_of\_shards: 1  
index.codec: best\_compression  
setup.kibana: ~  
output.logstash:  
hosts:  
- 10.0.4.74:5044  
processors:

- add\_host\_metadata:  
geo:  
name: 10.0.5.103  
continent\_name: Europe  
country\_iso\_code: GBR  
netinfo.enabled: true
- add\_fields:  
fields:  
sport: S  
competition: C  
location: L  
metricbeat.modules:
- module: system  
metricsets:
  - cpu
  - memory
  - network
  - process
  - process\_summary
  - uptime
  - socket\_summary
  - core
  - diskio
  - filesystem  
enabled: true  
period: 20s  
processes: [.\*]  
cpu.metrics: [percentages]  
core.metrics: [percentages]

Is there something I'm missing or would it be expected to take this long before being fully shut down?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [July 11, 2019, 2:31pm UTC](https://discuss.elastic.co/t/slow-to-stop-metricbeat-windows-service/188466/2 "2019-07-11T14:31:21Z")

</div>

@tomkirk Thanks for posting here! I don't see any known issues for this hmm.  
Besides show to shut down, are you seeing slow on fetching data or slow to store data into Elasticsearch?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 8, 2019, 2:31pm UTC](https://discuss.elastic.co/t/slow-to-stop-metricbeat-windows-service/188466/3 "2019-08-08T14:31:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
