Unable to create a Memorystore for a Redis instance

Problem

Unable to create a Memorystore for a Redis instance due to the following error:

"message": "Unable to create instance. The allocated private IP address space is exhausted.

Environment

  • Memorystore for Redis

Solution

  1. Allocate a new private services range for Memorystore for Redis.

If you are not using Cloud SQL, deleting the Cloud SQL instances would delete the auto generated routes, and you should be able to proceed with creating a Redis Instance however Cloud SQL takes a few days for the instance to be completely deleted.

Cause

This issue is because the available IP addresses used in Private Service Connection have finished. You have an allocated IP range with /24 CIDR block for Private Service Connection. The allocated Private Service Connection IP range can be used by different services that want to connect VPC using Private Service Connect (i.e., CloudSQL).

The issue here is that you have in your project a SQL instance with the Private IP. As Redis tries to automatically generate a route, the SQL IP and the provided range will overlap (Cloud SQL needs a /24 CIDR block at a minimum for a basic deployment) and hence an error is observed. 

Note: Do not reuse the same allocated range  for multiple service producers. Each service producer has visibility only into their network and can't know which IP addresses other service producers are using.