# Application limit (throttle)

{% hint style="info" %}
Availability of the functionality depends on the license and may not be available in all deployments.
{% endhint %}

## Limit of active request instances

Limit of active request instances (so-called *throttle*) allows limiting the number of simultaneously running requests of a given type on **a specific server**. Once the limit is exceeded, the user cannot start another instance – instead, an information page is displayed.

This solution is particularly useful in situations of increased system load or during maintenance work.

## Configuration

The limit configuration is done in the file:

```
/etc/eximee/webforms.xml
```

{% hint style="info" %}
Changes in the file are applied without the need to restart the Tomcat server.
{% endhint %}

Example configuration in the .xml file:

```js
<webforms>
    <server> 
        <limits>
            <forms>
                <_uwmappertest>3</_uwmappertest>
                <_demo_porownywarka_ofert>3</_demo_porownywarka_ofert>
            </forms>
        </limits>
    </server>
</webforms>
```

In the tag `<forms>` we define the requests covered by the limit:

```
<_FORMNAME>LIMIT</_FORMNAME>
```

Where:

* `FORMNAME` – request name,
* `LIMIT` – maximum number of active instances.

**Important rules:**

* each request name `FORMNAME` must have the prefix \_
* no entry means **no limit**,
* setting the value to 0 means complete **blocking of the request**.

### Configuration examples

**Complete blocking of the request**

```
<_przykladowy_wniosek>0</_przykladowy_wniosek>
```

After entering the request, the user will see a page informing them that it is unavailable.

**Limiting the number of instances**

```
<_przykladowy_wniosek>2</_przykladowy_wniosek>
```

The third attempt to start the request will result in an error page being displayed.

## Information page

The text on the information page can be set from within **Eximee Designer**, in the tab **Library → Content** and by searching for the formatted content **error\_page\_formLimitExceeded**.

You should also complete the file **webforms-error-pages.xml** by adding the following fragment:

```xml
<code_formLimitExceeded>
    <content>error_page_formLimitExceeded-*</content>
</code_formLimitExceeded>
```
