Hey, for me, this happened because I was using a custom cache plugin that connected to Redis. I’ve added an env variable to skip connecting to Redis for the build process. So in your case this maybe different, but check if there is any plugin or other code that keeps an open connection to some database or so. Hope that helps!
Examples from my code (may not apply to yours):
- Build command
IGNORE_CACHE=true yarn build - In
config/plugins.js:const cache = process.env.IGNORE_CACHE !== 'true' ? new KeyvAdapter(new Keyv(process.env.REDIS_URL)) : null(cacheis used ingraphql.config.apolloServer.cache)