# Setting a Server to Maintenance Mode in MaxScale with MaxGUI

## Overview

When using MaxScale, it is often necessary to temporarily remove a server from the load balancing pool without actually shutting down the server. This is usually needed to perform maintenance on the server, such as when upgrading the server's software or when performing schema upgrades.

MaxScale allows users to set servers to "maintenance mode", which prevents MaxScale from routing traffic to the server and prevents it from being elected as the new primary server during failover or switchover.

MaxGUI is a graphical utility that can perform administrative tasks using MaxScale's [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md). It can be used to set a server to maintenance mode.

## Setting a Server to Maintenance Mode

1. [Configure MaxScale for MaxGUI](/docs/maxscale/maxscale-management/maxgui/configuring-maxscale-for-maxgui.md).
2. Visit MaxGUI in your web browser. For example, if you are accessing it from local host with the default port, then visit this address: [127.0.0.1:8989](https://127.0.0.1:8989)
3. Enter your username and password to log in.
4. On the dashboard, the "Servers" tab is shown by default.
5. Click the server that you want to set to maintenance mode. This will bring up a page for the specific server.<br>

   <figure><img src="/files/KouSbSby4DTQEl9XzWjK" alt=""><figcaption></figcaption></figure>
6. Click the gear icon at the top left corner of the page next to the server name. This will show some options in a popup.<br>

   <figure><img src="/files/5byBIr9OWMrwG87ECYLl" alt=""><figcaption></figcaption></figure>
7. Click the wrench icon. This will open a popup window.<br>

   <figure><img src="/files/sK1O7hFhTf4dnH8SeqiE" alt=""><figcaption></figcaption></figure>
8. Click the "Set" button. If the specified server is a primary server, then MaxScale will allow open transactions to complete before closing any connections.

## Forcing a Server to Maintenance Mode

1. [Configure MaxScale for MaxGUI](/docs/maxscale/maxscale-management/maxgui/configuring-maxscale-for-maxgui.md)
2. Visit MaxGUI in your web browser. For example, if you are accessing it from local host with the default port, then visit this address: [127.0.0.1:8989](https://127.0.0.1:8989)
3. Enter your user and password to login.
4. On the dashboard, the "Servers" tab is shown by default.
5. Click the server that you want to set to maintenance mode. This will bring up a page for the specific server.<br>

   <figure><img src="/files/GqynCDksBYj9JJMjFqYX" alt=""><figcaption></figcaption></figure>
6. Click the gear icon at the top left corner of the page next to the server name. This will show some options in a popup.<br>

   <figure><img src="/files/yyVBFz03ZvUwX6fXtbTR" alt=""><figcaption></figcaption></figure>
7. Click the wrench icon. This will open a popup window.<br>

   <figure><img src="/files/yRUA0vseekw9MqVXbyTR" alt=""><figcaption></figcaption></figure>
8. Check the "Force closing" checkbox.<br>

   <figure><img src="/files/1e5pHZNltMj1PwUavBgU" alt=""><figcaption></figcaption></figure>
9. Click the "Set" button. When the "Force closing" checkbox is specified, MaxScale immediately close all connections, even if the server is a primary server that has open transactions.

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# 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://mariadb.com/docs/maxscale/maxscale-management/maxgui/maxgui-setting-a-server-to-maintenance-mode-in-maxscale-with-maxgui.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.
