# Why is location plugin using so much CPU?

**URL:** https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478
**Category:** Self-hosting
**Created:** [November 27, 2020, 9:29am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478 "2020-11-27T09:29:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [November 27, 2020, 9:29am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/1 "2020-11-27T09:29:34Z")

</div>

I rebuilt the container with the latest test-passed from today, and suddenly all the CPU cycles are used up. The site becomes real slow.

The server pretty much only has Discourse running. What’s this openvpn user running the Ruby/ unicorns? Is it the same as the Discourse unicorns?

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/1/41b6f85f57a7be2579d80ec6f4eb2d10c5d62256.png)

Assuming this is intended and desired, how can I free up some cpu cycles so the site doesn’t run so slow?

Sidekiq is showing barely anything running in the background. No users are on other than me.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [November 27, 2020, 9:40am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/2 "2020-11-27T09:40:55Z")

</div>

Potentially also an issue here, I upgraded at 09:03 this morning, will monitor during the day:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/2/e2f93b543f4968a1c65b0d628fdf649fb4e46797.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/6/963e52a433bf26d4d9049629b877815bffd670bb.png)

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [November 27, 2020, 9:43am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/3 "2020-11-27T09:43:02Z")

</div>

Our two CPU cores are 100% utilized.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/1/a1bf94e38c54fd27e8cfb02f4c96dc6ba2961b51.png)

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [November 27, 2020, 9:52am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/4 "2020-11-27T09:52:22Z")

</div>

Mine seems to be coming down again now, will continue to monitor.

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/9/4973749613482f8d3ecdd6cea65b4e35815f9506.png)

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [November 27, 2020, 9:59am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/5 "2020-11-27T09:59:23Z")

</div>

Removed the layouts plugin and the location plugin and the problem resolved itself for now. Because its really late my time I haven’t had a chance to isolate whether one or both or none are causing the issue, but @angus @merefield giving you a heads up.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [November 27, 2020, 11:39am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/6 "2020-11-27T11:39:55Z")

</div>

Mine has also returned completely back to normal after turning off the locations plugin:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/8/d8ba5852690ea71735a258f6680ac81ac94483e9.png)

Did you have the issue I’ve mentioned in this topic too @ckshen ?

> [@Locations Plugin earth\_africa](https://meta.discourse.org/t/locations-plugin/69742/639):
>
> Latest update to core seems to have killed this stone dead: Clicking the user map, or the map icon on a user card causes a self inflicted dos pensive It then just keeps going, killing the browser stone dead within a handful of seconds: Same on the user map page: I’ve had to disable the plugin completely this morning.

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [November 28, 2020, 7:14am UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/8 "2020-11-28T07:14:20Z")

</div>

I didn’t have a chance to check the errors before I took down the plugins. And then today I rebuilt Discourse to 2.6.0.beta6 ( [e7bad9f05d](https://github.com/discourse/discourse/commits/e7bad9f05d70db666f992b55e024d77ead6db030)). Problem went away.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [July 16, 2025, 7:00pm UTC](https://meta.discourse.org/t/why-is-location-plugin-using-so-much-cpu/171478/9 "2025-07-16T19:00:23Z")

</div>

A basic question, how does one know which plugin is taking how much CPU and memory? htop only shows the unicorn workers but not much resource each plugin is utilizing.
