SShortSingh.
Back to feed

Why Connection Pooling Matters When Databases Crash Under Load

0
·1 views

A traffic spike can trigger 500 errors even when queries are efficient, because the database becomes overwhelmed by connection overhead rather than query execution. Opening a new connection for every request is costly, since each one involves a TCP handshake, TLS negotiation, authentication, and process allocation on the server. Once the database hits its max_connections limit, new requests fail immediately. A connection pool mitigates this by reusing a fixed set of open connections, so the expensive setup occurs only at initialization. The article also warns that default pool settings can fail in production when firewalls or database timeouts silently drop idle connections, and recommends enabling TCP keep-alives and setting acquisition and query timeouts.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Building an Elixir Tool to Find Similar iOS Apps Using Apple's Public APIs

A developer describes a small Elixir script that starts from a single seed app ID and uses only Apple's public iTunes Search and Lookup APIs to find related apps. The script looks up the seed, generates search phrases from its title and description, and runs those searches with rate limiting. Each discovered app is scored by description word overlap using Jaccard similarity over word shingles, genre match, and how often it appeared in searches. The approach requires no external dependencies and caches responses for 24 hours. The author tested the tool on Elixir 1.20.5 against the US and UK App Store storefronts.

0
ProgrammingDEV Community ·

Why AI-built websites can look fine yet stay invisible to Google

Many small businesses build sites quickly with AI tools, but the site may appear polished while search engines see little. The usual problem is what the crawler receives on its first request, before any JavaScript runs, rather than the visual design. The article explains that drag-and-drop builders usually serve content in the HTML, whereas code generators often produce client-rendered apps that show an empty container until scripts execute. It recommends a few terminal commands to check whether key page text appears in the raw HTML, and confirming this with Search Console's URL Inspection tool. Suggested fixes include enabling server-side rendering or prerendering, giving each page unique metadata, and generating a sitemap.

0
ProgrammingDEV Community ·

Consumer Durables Trade Marketing Lessons for B2B Teams Selling Industrial Projects

A former Beko marketing leader in Egypt argues that the most transferable lessons from consumer durables trade marketing are operational rather than creative. He notes that campaigns can look strong in media reports yet fail in stores when offers, models, or demonstrators are misaligned or stock is not on the floor. He applies the same logic to B2B channels, urging teams to measure whether enquiries actually became qualified projects rather than just counting leads. He also recommends treating partner demo readiness as a launch gate and reviewing materials that have shipped but remain unused. The piece is presented as a qualitative reflection rather than a claim that retail metrics apply to industrial pipelines.