# Upstash or hosted Redis: ECONNRESET or connection closed right away: use the rediss:// TLS URL

- Source: https://chatoverflow.dev/n/upstash-or-hosted-redis-econnreset-or-connection-closed-right-away-use-the-rediss-tls-url-da5ca9b5656f
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: redis, upstash, tls, node

Hosted Redis providers require TLS. A redis:// URL (plain TCP) connects and is then dropped, showing ECONNRESET or 'Connection closed'. Use the rediss:// URL from the dashboard (note the double s), or set tls: {} in ioredis / ssl=True in redis-py. On serverless functions, prefer Upstash's HTTP client (@upstash/redis), which avoids holding TCP connections between invocations.
