# Elastic Agents error after installation: ...fleet-server returned an error: MaxLimit

**URL:** https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716
**Category:** Endpoint Security
**Tags:** fleet
**Created:** [July 14, 2021, 9:11pm UTC](https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716 "2021-07-14T21:11:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jamespichardo](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jamespichardo](https://discuss.elastic.co/u/jamespichardo)
#### Post date: [July 14, 2021, 9:11pm UTC](https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716/1 "2021-07-14T21:11:13Z")

</div>

After installing, Elastic Agents it keeps in "Offline" state and "Healthy" intermittently. When checking Agent logs I found this error several times:

## -- [elastic\_agent][error] Could not communicate with fleet-server Checking API will retry, error: status code: 429, fleet-server returned an error: MaxLimit, message: exceeded the max limit

Please note that I have APM-Fleet server in Elastic cloud with 1GB RAM (2 zones). Attached you'll find a screenshot where you can see I don't even have 1,000 agents installed.

 ![Screen Shot 2021-07-14 at 5.10.28 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1a26c5721a140a8bfbbea9d2ba74ddf4e3197066.png)

Additionally:

 ![Screen Shot 2021-07-15 at 10.12.18 AM](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d2d9f3f470a9fc008d5056792f4bd4e952625a92.png)

Cheers,  
James.

---

<div class="post-metadata">

### Author: ![blaker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blaker/32/65621_2.png) [@blaker](https://discuss.elastic.co/u/blaker)
#### Post date: [July 19, 2021, 3:16pm UTC](https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716/2 "2021-07-19T15:16:43Z")

</div>

The default settings for the Elastic Agent in Cloud have a maximum connection limit on Fleet Server. This is because the default instance type is only 512MB so we set a default connection limit so the instance does not run out of memory. Because you are using larger instances you can increase this limit to allow more Elastic Agent's to connect at once.

The limit is set inside of the `Elastic Agent on Cloud` policy. Modify the `fleet-server` integration inside that policy to increase the max connections limit.

---

<div class="post-metadata">

### Author: ![mostlyjason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mostlyjason/32/60849_2.png) [@mostlyjason](https://discuss.elastic.co/u/mostlyjason)
#### Post date: [July 19, 2021, 4:27pm UTC](https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716/3 "2021-07-19T16:27:50Z")

</div>

Here is a screenshot of the page where you need to raise the connection limit. FYI there are additional limits if you expand the advanced options. We plan to have docs with more guidance on this soon.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7d2b9910c1ce792c070effd2e8de28e5df3665b0.png)

---

<div class="post-metadata">

### Author: ![mostlyjason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mostlyjason/32/60849_2.png) [@mostlyjason](https://discuss.elastic.co/u/mostlyjason)
#### Post date: [July 19, 2021, 5:09pm UTC](https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716/4 "2021-07-19T17:09:21Z")

</div>

One more setting that you need to change is the max number of checkins. The max connection setting in the UI should be great than or equal to the sum of the maxes for all the server limits. So in the example below, it should be set to at least 100 + 10 + 20 + 10. This limit is enforced before TLS is evaluated, so its a way to prevent DDOS. We're working to improve this UX in an upcoming release.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/6/960b48b7a0fd27820425143d7a0f75931292ef56.png)

---

<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 16, 2021, 5:09pm UTC](https://discuss.elastic.co/t/elastic-agents-error-after-installation-fleet-server-returned-an-error-maxlimit/278716/5 "2021-08-16T17:09:45Z")

</div>

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