SayDeploy Plain comparisons of developer tools, AI coding tools included

How to restart a stuck dev server for frontend developers

Restart a stuck local dev server for frontend work: stop the hung process, free its port, start again, and check the logs.

By SayDeploy ยท

SayDeploy is published by LunarWerx, which makes some of the tools compared here.

To restart a stuck dev server, stop the process that is hanging, free the port it was using, start it again, and read the output for the error that caused the hang.

OptionWhat it doesCost
DevWebUIStarts, stops and restarts local dev servers from one dashboard, and shows status, CPU, memory and logs. [1]Free, and core features need no account. [1]
Terminal commandsCheck whether the stop step ends the process completely.not published
Development environment run configurationsCheck whether a single service can restart without the others.not published

What you need before you start

Before you restart a stuck dev server, know the command that starts it, because you will need the same command to bring it back. Keep the port number the server uses at hand, since a hung process often keeps holding that port after it stops responding. Know where the server writes its output, whether that is a terminal window, a log file or a dashboard, so you can read the last error before you restart. Make sure the project's dependencies are installed and that any services the frontend calls, such as an API or a database, are running. If you changed environment settings or configuration files recently, note what changed, because a failed restart may come from that change rather than from the hang itself. Save your code changes before stopping anything, so a restart does not discard recent edits. Having these details ready turns a restart into a short, repeatable routine instead of a guessing game.

Step by step

  1. Look at the server's output first. Find the last error, or the last line printed before the output stopped moving.
  1. Confirm that the server is actually stuck. Reload the page in the browser and check whether the terminal still shows any activity.
  1. Stop the server cleanly. Use the stop command, or press the interrupt keys in the terminal that runs it.
  1. If the server does not stop, find the process that still holds its port and stop that process too.
  1. Check that the port is free before starting again. A port still in use will block the new start.
  1. Clear a cache only if the error names it, such as a build cache or a bundler cache. Clearing caches at random can hide the real cause.
  1. Start the server again with the same command you used before.
  1. Open the frontend and confirm that the page loads and that a small change to a file refreshes the page.
  1. If the server hangs again, read the error that appeared just before the hang and fix that cause, rather than restarting once more.

Tools that can do it

DevWebUI is made by the team that publishes this site. DevWebUI lets you start, stop and restart local dev servers from one dashboard, and see each one's status, CPU, memory and logs. [1] When a port is already taken, it shows which process holds it and can free the port if you ask. [1] If the last shutdown was not clean, the next launch loads your projects but starts nothing automatically. [1]

DevWebUI also includes a devwebui command-line tool that talks to the same REST API, so you can restart a process without opening the GUI. [1] A prebuilt Windows x64 app is available, and on other systems you run it from source with Bun. The tray app is Windows-only for now. [1] On Windows you download devwebui-windows-x64.exe from GitHub Releases. On any operating system you can run bun install and then bun run dev. [1]

For terminal commands, check whether the stop step ends the process completely before you start it again. For development environment run configurations, check whether a single service can restart without the others. Compare the features, setup style and operating system support of any tool before you choose it.

Common mistakes to avoid

Restarting a server again and again without reading its last error is the most common mistake, because the same fault will cause the same hang. Closing only the terminal window can leave the server process running in the background, which keeps the port busy. Starting a second copy while the first still holds the port leads to errors that look like a new problem. Changing several settings at once makes it hard to tell which change helped. Forgetting to save code before a restart can lose recent edits. Skipping the check that the page loads after a restart can leave a broken setup looking healthy, so confirm the result every time.

Frequently asked questions

How do you restart a stuck frontend dev server?

Start by reading the last error in the server's output. Then stop the server, and if it does not stop, find the process still holding its port and stop that too. Confirm the port is free, start the server again with the same command, and open the frontend to check that the page loads. If the server hangs again, fix the cause shown in the error rather than restarting repeatedly.

Why does a dev server keep its port after it hangs?

A hung server can leave its process running in the background even when the terminal looks closed. That process still holds the port, so a new start fails with a port error. Finding the process that uses the port and stopping it frees the port for the next start. Checking the port before starting again saves time.

Is DevWebUI free for restarting dev servers?

DevWebUI is free, and its core features need no account. [1] It can start, stop and restart local dev servers from one dashboard. [1] The tray app is Windows-only for now, so check the platform list before installing. [1] Compare it with terminal commands and run configurations before you decide which suits your project.

Can DevWebUI show errors from a server that keeps hanging?

DevWebUI collects errors into one log that merges repeats and is kept across restarts, and each file:line link opens in your editor. [1] Reading that merged log before you restart can show the error that caused the hang. Check whether any other tool you consider keeps errors across restarts before you rely on it.

What should frontend developers check before choosing a tool to restart dev servers?

Check whether the tool can stop and restart one server without affecting the others. Look at how it handles a port that stays busy after a hang, how it shows each server's output, and whether it keeps its state after an unclean shutdown. Confirm that it supports your operating system and that its install steps fit your setup.

DevWebUI is free, and its core features need no account. [1]

Try DevWebUI

Sources

  1. DevWebUI's own description of itself (the product of this site's publisher)

Related comparisons