Troubleshoot issues

This page explains various error scenarios, and provides guidance for resolving the errors.

Connectivity error scenarios

This section explains connectivity issues your instance can encounter.

Connection error caused by firewall rules

Firewall rules can cause connection errors by blocking the ports used by Memorystore for Valkey. You should allow list all ports for both of your instance's Private Service Connect endpoints. For more information about the endpoints, see Reserved network addresses.

Connection error caused by organization policies.

You can have an organization policy that blocks your PSC connections to your Memorystore for Valkey instance.

If your organization policy uses the .restrictPrivateServiceConnectProducer policy, then allow list the 961333125034 folder number, which is a folder specifically for Memorystore for Valkey. For example:

name: organizations/Consumer-org-1/policies/compute.restrictPrivateServiceConnectProducer
spec:
    rules:
      - values:
          allowedValues:
          - under:folders/961333125034

If your organization policy uses the .disablePrivateServiceConnectCreationForConsumers policy, you should allow list SERVICE_PRODUCERS. For example:

name: organizations/Consumer-org-1/policies/compute.disablePrivateServiceConnectCreationForConsumers
spec:
    rules:
      - values:
          allowedValues:
          - SERVICE_PRODUCERS

Handling errors for Cluster Mode Disabled instances

  • If the application connects to the read endpoint of an instance which has no read replicas, then the connection closes and the ERR no replicas found error message appears. In this case, either try to connect the application to the primary endpoint or add read replicas to the instance.

  • In the event of a failover, the existing connections from your application closes and the ERR role change occurred error message appears. You would also see this error message if your application connects to the read endpoint of an instance, and all read replicas of the instance are failing. In this case, the application should retry the connection with exponential backoff.