Anyone ever seen an error like this before with pgboss?
wasp-server-1 | Error: getaddrinfo EAI_AGAIN db
wasp-server-1 | at /app/node_modules/pg-pool/index.js:45:11
wasp-server-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
wasp-server-1 | at async Db.executeSql (/app/node_modules/pg-boss/src/db.js:28:14)
wasp-server-1 | at async Timekeeper.cacheClockSkew (/app/node_modules/pg-boss/src/timekeeper.js:114:24)
wasp-server-1 | at async Timekeeper.start (/app/node_modules/pg-boss/src/timekeeper.js:53:5)
wasp-server-1 | at async PgBoss.start (/app/node_modules/pg-boss/src/index.js:114:7)
wasp-server-1 | at startPgBoss (/app/.wasp/out/sdk/wasp/server/jobs/core/pgBoss/pgBoss.ts:63:5)
wasp-server-1 | at startServer (/app/.wasp/build/server/src/server.ts:14:3) {
wasp-server-1 | errno: -3001,
wasp-server-1 | code: 'EAI_AGAIN',
wasp-server-1 | syscall: 'getaddrinfo',
wasp-server-1 | hostname: 'db'
wasp-server-1 | }
tryna figure out what this means but I have literally no idea. this happens for other things with pgboss
3 Replies
Hi @Wlski. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The error message you're seeing is related to the
pg-boss
package, which is a job queue library for Node.js that uses PostgreSQL for storage. The error EAI_AGAIN
is a DNS lookup timed out error, which means it is a network connectivity error or could be a DNS issue. It seems like pg-boss
is trying to connect to a database at the hostname 'db' and is unable to resolve that hostname.
In the context of Wasp, pg-boss
is used for handling jobs. There have been some issues reported with pg-boss
failing to start, as seen in the Github Issue 1605 (https://github.com/wasp-lang/wasp/issues/1605) and the Discord support thread (https://discord.com/channels/686873244791210014/1098429088164753498). However, these issues seem to be related to connection issues with the database rather than DNS resolution problems.
If you're running this in a Docker environment, the hostname 'db' might be a service name defined in your docker-compose.yml
file. Make sure that the service is correctly set up and that the network settings allow for the 'db' hostname to be resolved.
If you're not using Docker or if 'db' is supposed to be a hostname on your network, you might need to check your network settings and DNS configuration.
Unfortunately, without more context or information about your specific setup, it's hard to provide a more precise answer. If you're using Wasp and encountering this issue, I would recommend reaching out on their Discord server or opening an issue on the Wasp Github repository for more targeted assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Wlski, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Hey @Wlski
tryna figure out what this means but I have literally no idea. this happens for other things with pgbossYou mean other than Wasp apps?
How are you connecting to your database? Are you running it yourself? Is this happening locally or on a server?