twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
17.8k stars 2.11k forks source link

Redis Connection Error: ECONNREFUSED at 127.0.0.1:6379 Causing Service Failure #8269

Open KazeroG opened 4 hours ago

KazeroG commented 4 hours ago

Bug Description

When running the application, a connection error occurs with Redis, causing the service to exit. This issue happens because the application cannot connect to 127.0.0.1:6379, resulting in an ECONNREFUSED error in the logs.

ERROR [ExceptionHandler] connect ECONNREFUSED 127.0.0.1:6379
Error: connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)

Expected behavior

The application should successfully connect to Redis at 127.0.0.1:6379, or an alternative Redis instance if configured, without raising connection errors. The application should start and run as expected without interruption.

Technical inputs

other info

  1. Hosting : render.com
  2. version twenty:server : Latest
  3. Render.yaml Blueprint
    # Exported from Render on 2024-10-12T14:37:13Z
    services:
    - type: worker
    name: twenty:worker
    runtime: image
    image:
    url: docker.io/twentycrm/twenty:latest
    creds:
      fromRegistryCreds:
        name: dockerhub
    plan: standard
    envVars:
    - key: REFRESH_TOKEN_SECRET
    sync: false
    - key: LOGIN_TOKEN_SECRET
    sync: false
    - key: FILE_TOKEN_SECRET
    sync: false
    - key: ACCESS_TOKEN_SECRET
    sync: false
    - fromGroup: Twenty
    region: oregon
    dockerCommand: yarn run worker:prod
    - type: web
    name: twenty:server
    runtime: image
    image:
    url: docker.io/twentycrm/twenty:latest
    creds:
      fromRegistryCreds:
        name: dockerhub
    plan: standard
    envVars:
    - key: REFRESH_TOKEN_SECRET
    sync: false
    - key: LOGIN_TOKEN_SECRET
    sync: false
    - key: FILE_TOKEN_SECRET
    sync: false
    - key: ACCESS_TOKEN_SECRET
    sync: false
    - fromGroup: Twenty
    region: oregon
    dockerCommand: yarn run start:prod
    disk:
    name: disk
    mountPath: /.local-storage
    sizeGB: 5
    version: "1"
FelixMalfait commented 3 hours ago

Hey @KazeroG - we don't officially maintain the Render.yaml but a pull request would be most welcome! It seems it's missing a redis in Render.yaml https://docs.render.com/redis