LucasReinaldo
LucasReinaldo
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
yeah :/
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
anyway, if it happens again I'll copy the metrics from prisma
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
I'll review my Promise.all, like I do get a lot of data every minute or so and 15mins, but I already batch the inserts and updates
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
🤔
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
DATABASE_URL yes
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
DATABASE_LAMBDA_URL I was using to test the inngest environment, they say to share a single instance of prisma within the step function but don't say anything about datasource see here: https://www.inngest.com/docs/reference/middleware/examples#prisma-in-function-context
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
the directurl is only for migrations
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
datasource db url
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
# HELP prisma_client_queries_total Total number of Prisma Client queries executed
# TYPE prisma_client_queries_total counter
prisma_client_queries_total 1130

# HELP prisma_datasource_queries_total Total number of Datasource Queries executed
# TYPE prisma_datasource_queries_total counter
prisma_datasource_queries_total 5349

# HELP prisma_pool_connections_closed_total Total number of Pool Connections closed
# TYPE prisma_pool_connections_closed_total counter
prisma_pool_connections_closed_total 18

# HELP prisma_pool_connections_open Number of currently open Pool Connections
# TYPE prisma_pool_connections_open counter
prisma_pool_connections_open 40

# HELP prisma_client_queries_active Number of currently active Prisma Client queries
# TYPE prisma_client_queries_active gauge
prisma_client_queries_active 0

# HELP prisma_client_queries_wait Number of queries currently waiting for a connection
# TYPE prisma_client_queries_wait gauge
prisma_client_queries_wait 0

# HELP prisma_pool_connections_busy Number of currently busy Pool Connections (executing a database query)
# TYPE prisma_pool_connections_busy gauge
prisma_pool_connections_busy 0

# HELP prisma_pool_connections_idle Number of currently unused Pool Connections (waiting for the next pool query to run)
# TYPE prisma_pool_connections_idle gauge
prisma_pool_connections_idle 400

# HELP prisma_pool_connections_open Number of currently open Pool Connections
# TYPE prisma_pool_connections_open gauge
prisma_pool_connections_open -18

# HELP prisma_pool_connections_opened_total Total number of Pool Connections opened
# TYPE prisma_pool_connections_opened_total gauge
prisma_pool_connections_opened_total 40
# HELP prisma_client_queries_total Total number of Prisma Client queries executed
# TYPE prisma_client_queries_total counter
prisma_client_queries_total 1130

# HELP prisma_datasource_queries_total Total number of Datasource Queries executed
# TYPE prisma_datasource_queries_total counter
prisma_datasource_queries_total 5349

# HELP prisma_pool_connections_closed_total Total number of Pool Connections closed
# TYPE prisma_pool_connections_closed_total counter
prisma_pool_connections_closed_total 18

# HELP prisma_pool_connections_open Number of currently open Pool Connections
# TYPE prisma_pool_connections_open counter
prisma_pool_connections_open 40

# HELP prisma_client_queries_active Number of currently active Prisma Client queries
# TYPE prisma_client_queries_active gauge
prisma_client_queries_active 0

# HELP prisma_client_queries_wait Number of queries currently waiting for a connection
# TYPE prisma_client_queries_wait gauge
prisma_client_queries_wait 0

# HELP prisma_pool_connections_busy Number of currently busy Pool Connections (executing a database query)
# TYPE prisma_pool_connections_busy gauge
prisma_pool_connections_busy 0

# HELP prisma_pool_connections_idle Number of currently unused Pool Connections (waiting for the next pool query to run)
# TYPE prisma_pool_connections_idle gauge
prisma_pool_connections_idle 400

# HELP prisma_pool_connections_open Number of currently open Pool Connections
# TYPE prisma_pool_connections_open gauge
prisma_pool_connections_open -18

# HELP prisma_pool_connections_opened_total Total number of Pool Connections opened
# TYPE prisma_pool_connections_opened_total gauge
prisma_pool_connections_opened_total 40
this only for the past 30mins
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
yep, the low as possible is in a lambda environment, in railway I've bumped a few times. the db allows me to: No. of direct connections - 240 No. of pooler connections - 700 and I also have inngest (https://www.inngest.com/) that I run some fan-out/batch inserts and updates also deployed in railway
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
appreciate
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
thanks dude
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
yep, maybe I should contact support
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
should I call prisma.$disconnect at the end of the function, I reviewed all api endpoints and in all of then I am either returning success or error, so there is always a return response.json 🤔
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
even with 700 pooled connections? like, seems weird
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
like the project is running fine, then I get a lot of data in a short period and my connection limit goes to shit and keeps timing out
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
i'll keep an eye on
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
got it
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
just making sure that, I want to keep the connection_limit as low as possible and increase the timeout, that's the recommendation ?
69 replies
RRailway
Created by LucasReinaldo on 9/7/2023 in #✋|help
pgbouncer
np
69 replies