> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Increase Memory Allocation for a Redis Instance on cPanel

> This guide explains how to increase the memory allocation of a Redis instance on a cPanel server.  On cPanel servers using CloudLinux, each account is restricted by LVE (Lightweight Virtual Environment) limits.

<Note>
  **Redis memory usage counts toward your account’s total memory limit.**
</Note>

So if your LVE memory limit is:

* **1GB** total, and you set Redis to **1024MB**, you risk:
  * Hitting the limit
  * Causing slowdowns
  * Getting processes killed (including Redis or PHP)
  <br />

**Safe Approach**

Keep Redis within **25%–50%** of your LVE memory

Examples:

* LVE = 1GB → Redis: **256MB–512MB** max
* LVE = 2GB → Redis: **512MB–1GB**
* LVE = 4GB → Redis: **1GB–2GB**

<br />

<Note>
  **This applies only to servers on the new infrastructure (domains ending in `.mysecurecloudhost.com `or .`stableserver.com`).**
</Note>

<br />

## Step 1: Access Redis in cPanel

1. Log in to your **cPanel** account.
2. Navigate to **cPanel → Redis**.
3. Ensure your Redis instance is running:
   * If it is not running, click **Start Redis Server**.

![](https://files.readme.io/b7aec26389bd1ca5ebf249b7ff391857ed6da88b55e7e1c1cc2368715a9d58cc-image.png)

<br />

## Step 2: Connect to the Redis Instance

<br />

To modify Redis configuration, you’ll need to access it via the command line.
Use the `redis-cli` tool with your instance’s port and password. For example:

```
redis-cli -p 41435 -a Pass1234
```

<br />

Once connected, you will see a prompt similar to:

```
127.0.0.1:41435>
```

<br />

## Step 3: Set the Maximum Memory Limit

To increase the memory allocation, run:

```
CONFIG SET maxmemory 1024mb
```

<br />

This example sets the limit to **1024 MB** (1 GB). Adjust the value as needed for your use case.

<br />

## Step 4: Make the Change Persistent

By default, configuration changes are temporary. To save them permanently, run:

```
CONFIG REWRITE
```

<br />

This ensures the new memory limit persists after restarts.

<br />

## Step 5: Verify the Configuration

To confirm the new memory allocation, run:

```
CONFIG GET maxmemory
```

<br />

You should see output similar to:

```
1) "maxmemory"
2) "1073741824"
```

<br />

The value is shown in bytes (in this case, 1024 MB = 1073741824 bytes).

Restart the Redis server and flush its database.

![](https://files.readme.io/0cf977efc2d75b45d01b7a626fb587eb662683f553346bc191d64ce789aaa8f6-image.png)

<br />
