代码之家  ›  专栏  ›  技术社区  ›  Agnes Kabanga

渲染时与postgreSQL的strapi连接,错误:getaddrinfo EAI_AGAIN dpg-cjk5hqdk5scs73a7f9b0-a

  •  0
  • Agnes Kabanga  · 技术社区  · 1 年前

    我在渲染平台上部署了strapi。strapi构建正确,但在渲染时连接到postgreSQL数据库时遇到此错误:

    Error: getaddrinfo EAI_AGAIN dpg-cjk5hqdk5scs73a7f9b0-a
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26) {
    errno: -3001,
    code: ‘EAI_AGAIN’,
    syscall: ‘getaddrinfo’,
    hostname: ‘dpg-cjk5hqdk5scs73a7f9b0-a’
    }
    

    here is my code of database.js file in cand config folder:

    here is my code of .env file:

    帮我解决这个问题

    0 回复  |  直到 1 年前
        1
  •  0
  •   JT1337    1 年前

    我也使用渲染,我注意到你有 host: env('DATABASE_HOST', 'your database host url'),

    对我来说是 host: env('DATABASE_HOST', 'localhost'), 而且它工作得很好。