SShortSingh.
Back to feed

Fixing Neon Tagged-Template vs Query API Errors in Next.js Serverless Cron Jobs

0
·1 views

A developer building a 24/7 campaign tracking pipeline for Indian D2C brands ran into failures in Next.js cron jobs using Neon's serverless driver. Passing raw query strings with dynamic fragments caused a type mismatch error, while a mix of parameterization approaches led to silent failures or empty results. The fix was to rewrite data-access functions using Neon's native tagged template literal syntax, with helper functions or query builders for dynamic parts. The author also reported that adding a retry loop with exponential backoff reduced transient connection timeouts on Vercel cold starts. Following the migration, batch completion time reportedly fell from about 3.2 seconds to about 450 milliseconds, and connection errors stopped.

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 ·

Webhook Dispatchers Stall Silently: Lease Expiry, Queue Forensics and Clock Skew

Outbound webhook dispatchers run at the boundary between internal systems and third-party endpoints that operators cannot control, which makes failures hard to spot. Standard metrics such as healthy API response rates and normal CPU can hide missing events that customers notice. Lease-based mutual exclusion, where workers hold time-limited claims on event batches and renew them with heartbeats, is commonly used to prevent duplicate work. However, a worker can become half-dead through long runtime pauses, CPU throttling, network partitions or event-loop starvation while its process still appears alive. Reclaiming such a lease too early risks duplicate deliveries and amplified load on already struggling consumers.

0
ProgrammingDEV Community ·

AI-Assisted LiDAR Mapping Aims to Track Vegetation Regrowth Near Homes Each Season

NASA recently released statewide laser maps of California, built from 118 aircraft surveys flown between 2013 and 2023, to help assess wildfire risk. Because vegetation keeps growing after each survey, land managers need to compare new flights against prior ones to see where brush has returned near homes. The article proposes running an organization-owned AI over its own data to flag canopy changes, with a forester approving any clearing decisions. Its reasoning is that such maps reveal sensitive infrastructure and that rented AI tools could train on that data for vendors. A published reference architecture describes one summer flight of imagery and LiDAR data bound into a site data model the operator controls, with a project manager accepting each deliverable against an accuracy report.

0
ProgrammingDEV Community ·

D-Link DWM-222W B1 modems on firmware v1.02.00 and earlier expose hard-coded admin credentials

D-Link's DWM-222W hardware revision B1 running firmware v1.02.00 or earlier contains hard-coded administrative credentials, tracked as CVE-2026-137704. Public analysis indicates the embedded account can reach the configuration backup endpoint and reveal plaintext user passwords. The vendor's support notice directs users to a newer fixed release, with the CVE record pointing to v1.02.04, and operators are advised to confirm current guidance before flashing and to back up configurations first. Because the device is a compact cellular modem, it is hard to locate through web searches, and two ZoomEye queries on November 28, 2026 returned 0 title matches and 10 body matches, which do not reliably indicate how many units are deployed. Recommended mitigations include restricting administrative access from untrusted networks, disabling remote management, rotating passwords if backups may have been downloaded, and verifying after updating that the embedded account is removed.

0
ProgrammingDEV Community ·

HBA vs RAID Controller for JBOD Shelves: How the Choice Shapes Storage Design

An article on DEV Community explains that the controller placed in front of a JBOD shelf determines who manages the array. An HBA passes each physical drive directly to the operating system, while a RAID controller creates virtual drives and hides the individual disks. The choice affects parity handling, rebuild behavior, what the file system can see, and how failures can be diagnosed. The author suggests an IT-mode HBA for software-defined systems such as ZFS, Btrfs, mdadm or Ceph, and a MegaRAID card for virtualization hosts that need hardware-managed volumes and a protected write cache. The piece notes that JBOD shelves contain no array logic of their own, so intelligence must reside either on the card or in the operating system.