Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why Awaiting an External API Inside a Database Transaction Will Exhaust Your Connection Pool

Why Awaiting an External API Inside a Database Transaction Will Exhaust Your Connection Pool While working on a Node.js backend that handled database transactions alongside third-party API integrations, I made an architectural mistake that initially felt completely reasonable: I opened a database transaction, ran an update, used await to call an external API, and committed the transaction once…

Awaiting an external API inside a database transaction can lead to exhausting the connection pool in a Node.js backend handling database transactions alongside third-party API integrations. The architectural mistake of running an update, awaiting an external API call, and committing the transaction together creates bottlenecks. If the external service slows down or becomes unavailable, the transaction stays open, occupying connections for longer than necessary.

This causes concurrent requests to wait in line for available connections, choking the whole system. To avoid connection pool bottlenecks, it is essential to decouple database writes from third-party services safely.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

What a GitHub Actions job costs on each runner: CI Bench v1 cost per job by workload

I maintain CI Bench, an open benchmark of GitHub Actions runners. I'm also the founder of Vitko, which sells one of the products measured (Vitko Runners, private beta).

  • Self-hosted 2 vCPU runners cost 88% less per job than GitHub-hosted 2 vCPU runners
  • Vitko Runners and Ubicloud offer 84% and 83% lower costs per job respectively
  • Self-hosted options have variable costs based on workload volume

Base64 in the Browser: UTF-8 Bytes, Padding and a Round Trip You Can Check

Base64 is not encryption, but the paste box still matters Base64 turns bytes into printable ASCII. It is an encoding, not encryption - anyone can decode what you encode - but the practical problem is…

  • Base64 converts bytes to printable ASCII characters, not encryption
  • Browser-based tool encodes/decodes locally without server upload
  • Encoded string deterministic, verifiable outside browser with Python

[Sponsor] OurCal

“I didn’t see you put that in the diary.” Sound familiar? Shared calendars solved scheduling, not communication. OurCal connects any calendar, new or existing, to a group chat.

More from Monday 2 November →