Hello... I keep getting a `ECONNREFUSED` error fro...
# orm-help
b
Hello... I keep getting a
ECONNREFUSED
error from the prisma client when I deploy my app:
Copy code
Error: connect ECONNREFUSED 127.0.0.1:33941\n    at cb (/home/app/function/src/generated/prisma/client/runtime/index.js:34800:17)
Meant to add more... This is happening in a docker container and the port number varies.
I can see my
node
process running, and a prisma query engine process start sometimes. I thought there was an issue with connection pooling, so I setup pgbouncer and connect to that.
Hmm... I just bumped up the memory on my container, and it looks like it's more stable now
💯 1
r
@Brian Woodward 👋 How much is it currently?
b
I've been bumping it up when I hit problems: • 40Mi with
pg
• 80Mi with
prisma
, simple 2 model schema, and restful (fastify) • 256Mi currently with a
prisma
, many models, and
graphql
fwiw... We're using
OpenFaaS
on kubernetes and these are hosted as
OpenFaaS
"microservice" functions, so the process stays up between requests. The
graphql
app was original poc using
prisma
and we're splitting the
primsa
schema into smaller, self-contained schemas for the microservices they represent. The
graphql
server will eventually only make calls to the other microservices and won't have
prisma
Soon, we'll probably get more into optimization and trying to determine the best strategy for scaling the microservices, but for now, we're just increasing memory.
💯 1
r
Yes the right combination of memory and CPU should work fine. 256Mi and above is what usually recommend.