Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Fix SQL Server Deadlocks: Causes, Detection and Real Fixes

Originally published at SQL & Cloud Lab . A deadlock happens when two sessions each hold a lock the other one needs. Neither can continue, so SQL Server picks one as the victim , rolls its transaction back and raises error 1205 . The other session carries on. Occasional deadlocks are normal in busy systems; frequent ones point to a fixable pattern in your code or indexes. What a deadlock looks…

A deadlock occurs when two sessions each hold a lock that the other needs. Neither session can continue, so SQL Server ends one transaction and raises error 1205. Occasional deadlocks are normal but frequent ones indicate a problem with code or indexes.

An example is two transactions updating the same two rows in opposite orders, creating a cycle. SQL Server records every deadlock in the system_health Extended Events session, which can be viewed as an XML graph. The graph shows the queries involved, the locks, the affected session, and the resources.

To fix deadlocks, apply the right fix. Access objects in the same order, keep transactions short, and add the right indexes. For readers, use read committed snapshot isolation. For read-then-update, use UPDLOCK to prevent hidden deadlocks. Retry error 1205 in the application with a small retry and randomised delay.

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

Submission week 4

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built Séance.dev lets you summon an archived open-source repo and talk to its ghost.

  • Séance.dev application summons archived repositories for user interaction
  • Ghost in the Machine theme highlights hidden reasoning in abandoned projects
  • Open-source code available on GitHub, customizable with different models

AfterImage

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built shellatol-s-sites.vercel.app Demo shellatol-s-sites.vercel.app Code…

  • "Ghost in the Machine" project uses ChatGPT and AI Katia plugin
  • Three interactive experiences: séance terminal, remembrance altar, digital archive
  • Concept explores digital traces outliving creators

Why Your v0 or Bolt App Fails to Deploy on Vercel (and How to Fix It)

Originally published at unbreakkit.netlify.app . The error Error: Command "npm run build" exited with 1 The real cause is earlier in the build log. Scroll up to the first red line.

  • Examine build log for first red line indicating root cause
  • Set required environment variables in Vercel Project Settings
  • Align Node.js version with Vercel's supported versions (24.x or 22.x)

One install, ten very different websites

In short: Polysite is a CMS that runs many websites from one install. Each site keeps its own domain, look, content and team. It is in beta, and free to use for your own sites.

  • Polysite allows multiple websites from a single installation
  • Each site maintains its own domain, appearance, content, team
  • Setup takes ~10 minutes with Docker, Compose, Git

More from Saturday 31 October →