# evt.setMaxHandlers(n)

By default `Evt` will print a warning if more than 25 handlers are added. This is a useful default that helps finding memory leaks. Not all events should be limited to 25 handlers. The `evt.setMaxHandlers()` method allows the limit to be modified for this specific `Evt` instance. ( Use the static method [`Evt.setDefaultMaxHandlers()`](https://docs.evt.land/api/evt/setdefaultmaxhandlers) to change this limit globally.

The value can be set to `Infinity` (or 0) to indicate an unlimited number of listeners.

Returns a reference to the Evt, so that calls can be chained.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.evt.land/api/evt/setmaxhandlers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
