# Enterprisesearch takes all CPU while Elasticsearch is quiet, and searches thow timeout

**URL:** <https://discuss.elastic.co/t/enterprisesearch-takes-all-cpu-while-elasticsearch-is-quiet-and-searches-thow-timeout/290388>\
**Category:** Elastic Search\
**Tags:** docker\
**Created:** [November 29, 2021, 3:59am UTC](https://discuss.elastic.co/t/enterprisesearch-takes-all-cpu-while-elasticsearch-is-quiet-and-searches-thow-timeout/290388 "2021-11-29T03:59:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpribi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gpribi/32/65066_2.png) [@gpribi](https://discuss.elastic.co/u/gpribi)\
**Post date:** [November 29, 2021, 3:59am UTC](https://discuss.elastic.co/t/enterprisesearch-takes-all-cpu-while-elasticsearch-is-quiet-and-searches-thow-timeout/290388/1 "2021-11-29T03:59:29Z")

</div>

Hello, I have a single node docker configuration with enterprise search and Elasticsearch, both 7.15.1. When my user quantity grows, my searches begin to return timeout every time (I see 60" response times on avg), and enterprisesearch takes almost all the available CPU, as you can see in the following screenshots.

 ![ScreenHunter_961 Nov. 29 00.39](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d6c2acb8720eb84513238f1a5bf7f6efc2a1288f.jpeg)  
 ![ScreenHunter_960 Nov. 29 00.38](https://us1.discourse-cdn.com/elastic/original/3X/9/3/930d50b31367620cb5deac289df78b6cbaa75743.jpeg)

My server is a m5a.xlarge on AWS. Elastic has 6GB RAM and Enterprise has another 6GB RAM. The docker stats command shows that enteprise has 300%+ of the cpu most of the time, while elastic hardly reaches 50%.

When my user quantity lowers, both elastic and enterprise are both very relaxed.

I've seen that a common architecture is having multiple Elasticsearch instances, but my problem seems to be with enteprise, not elastic.

For further information, I'm attaching all the kibana info. I don't know why the CPU metric is so low, maybe kibana thinks my server has more capacity.

 ![ScreenHunter_966 Nov. 29 00.43](https://us1.discourse-cdn.com/elastic/original/3X/9/6/96a5eb046e6d03c7b4ccae525a9fe8858c88da61.jpeg)  
 ![ScreenHunter_965 Nov. 29 00.43](https://us1.discourse-cdn.com/elastic/original/3X/4/1/416caad07e47ea09b847e9406a692c4b80c19e4e.jpeg)  
 ![ScreenHunter_964 Nov. 29 00.42](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fc542fd94039931d77f5acbe65a9413bf24511ce.jpeg)  
 ![ScreenHunter_963 Nov. 29 00.40](https://us1.discourse-cdn.com/elastic/original/3X/2/0/202c4f29a4acc6df779aed69196f537571568d4e.jpeg)  
 ![ScreenHunter_962 Nov. 29 00.40](https://us1.discourse-cdn.com/elastic/original/3X/9/3/9315fa7184aaa1e2c4ee0c906ea418262c5cf175.jpeg)  
 ![ScreenHunter_967 Nov. 29 00.43](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8aba6f053d43408cef1cc7106ec679d99ee66acd.jpeg)

Please help me, I can't keep having this crashes when I'm at my peak hour. Thanks!

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [February 1, 2022, 9:09pm UTC](https://discuss.elastic.co/t/enterprisesearch-takes-all-cpu-while-elasticsearch-is-quiet-and-searches-thow-timeout/290388/2 "2022-02-01T21:09:23Z")

</div>

Hi @gpribi ,

It's heavily recommended to not have a single-node Elasticsearch, and it seems clear from your screenshots that your Enterprise Search instance is contending for resources with Elasticsearch.

I'll suggest that you deploy your Elasticsearch nodes (plural) on infrastructure separate from your Enterprise Search node, and see if that helps.

You may want to consider using [cloud.elastic.co](http://cloud.elastic.co), so that you can worry less about the cluster architecture, and more about your data and application.

---

<div class="post-metadata">

**Author:** ![gpribi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gpribi/32/65066_2.png) [@gpribi](https://discuss.elastic.co/u/gpribi)\
**Post date:** [February 4, 2022, 9:01pm UTC](https://discuss.elastic.co/t/enterprisesearch-takes-all-cpu-while-elasticsearch-is-quiet-and-searches-thow-timeout/290388/3 "2022-02-04T21:01:36Z")

</div>

Hello @Sean_Story, that's exactly what I did, "split" the node into one Elasticsearch node and one enterprisesearch node, and it has been working fine since then. Thank you!

---

<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:** [November 4, 2022, 8:33am UTC](https://discuss.elastic.co/t/enterprisesearch-takes-all-cpu-while-elasticsearch-is-quiet-and-searches-thow-timeout/290388/4 "2022-11-04T08:33:09Z")

</div>


