REDIS_MAX_CONNECTIONS validation error in v1.13.1#
Resolved in v1.13.2. If you are running Dify v1.13.2 or later, this issue is already fixed and no workaround is needed. The information below applies only to users still running v1.13.1 or earlier.
When upgrading from Dify 1.13.0 to 1.13.1, containers may fail to start with this error:
pydantic_core._pydantic_core.ValidationError: 1 validation error for DifyConfig
REDIS_MAX_CONNECTIONS
Input should be a valid integer, unable to parse string as an integer
This affects both upgrades and fresh installations using the default .env.example file.
Workaround (v1.13.1 only): Add this line to your .env file:
REDIS_MAX_CONNECTIONS=10
Then restart:
docker compose down
docker compose up -d
Root cause: Version 1.13.1 introduced the REDIS_MAX_CONNECTIONS configuration to address Redis connection exhaustion issues. The docker-compose.yaml file passes an empty string when this variable is unset, which Pydantic cannot parse as an integer. Commenting out or removing the variable doesn't work due to the docker-compose configuration.
Permanent fix: A fix was merged on March 18, 2026 that allows empty strings to be treated as None. Version 1.13.2 (released on March 18, 2026) includes the fix. Users on v1.13.1 should upgrade to v1.13.2 or later. Status: Resolved.
About REDIS_MAX_CONNECTIONS: This fully optional setting limits the total connections in Redis connection pools across all deployment modes (standalone, Sentinel, Cluster, PubSub). In v1.13.2 and later, leaving this variable unset (or empty) is valid — the system correctly treats an empty value as "use the Redis client library default connection pool size". Set it to a specific integer only if you need to cap the pool size to match your Redis server's maxclients setting.