digdag server made too many Postgres connections on my machine
See original GitHub issue int maximumPoolSize = config.get("database.maximumPoolSize", int.class,
Runtime.getRuntime().availableProcessors() * 32); // HikariCP default: 10

My machine has 32 cores and digdag tried to make 1024 connections. It exceeded to my Postgres’s max_connections. And digdag occupied every postgres connection on the server. Other processes couldn’t make new connect/reconnect. It had broken other jobs on server.
I had written database.maximumPoolSize = 10
in postgresql.properties and it has stopped.
To prevent this tragedy on others
There are various ways:
- Limit
maximumPoolSize
to some percentage of max connections parameter. (by gettingSHOW max_connections
) - Warning when it exceeds.
- More document about maximumPoolSize and urge to set maximumPoolSize when user creating postgres.properties file (or encourage to setup pgpool).
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
psql: FATAL: too many connections for role - Stack Overflow
From inside any DB of the cluster: Catch 22: you need to be connected to a database first. Maybe you can connect as...
Read more >“Sorry, too many clients already” - How to Use PgPool to Solve ...
EDB explains how to handle the problem when maximum concurrent connections limit exceeds for PostgreSQL and step-by-step using Pgpool to ...
Read more >'FATAL too many connections' error when using PostgreSQL ...
Symptoms. A JIRA application PostgreSQL database may starve for connections through the authenticated applications PostgreSQL user, causing it ...
Read more >Hiroyuki Sato on Twitter: "@Civitaspo なるほど、デッドロックを ...
digdag server made too many Postgres connections on my machine · Issue #478 · treasure-data/digdag. 780d617#diff-d11545055f57d9e418a11dd1e06f680d int ...
Read more >Treasure Data FAQs - Comparably
You must be an account owner or administrator to change the role of an existing user. Open TD Console. Read More.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
use small connection pool size by setting
database.maximumPoolSize
(integer, default: available CPU cores * 32)@kitsuyui We released https://github.com/treasure-data/digdag/pull/515 instead of #466 as 0.9.8. It would be great if you try it