Guide on managing multiple Hugo server processes on a single machine including finding, understanding, and terminating active jobs to prevent conflicts and ensure smooth operation of HBStack-powered sites.
This document provides the information about running and managing Hugo server
When running multiple Hugo sites or similar services on one machine, it’s essential to monitor and manage active processes to avoid port conflicts, memory leaks, or zombie jobs.
Use ps and grep to locate processes:
1ps aux | grep hugo | grep -v grep
This lists all Hugo-related processes. Example output:
1user 12345 0.0 1.2 123456 7890 pts/0 S 12:34 0:01 hugo server --port 3300
12345)S (sleeping), R (running), T (stopped), Z (zombie)| Code | Meaning | Action Needed |
|---|---|---|
| R | Running | Normal |
| S | Sleeping | Normal |
| T | Stopped | Resume or kill |
| Z | Zombie (<defunct>) | Kill parent to clean up |
To terminate a process:
1kill <PID>
If it doesn’t respond:
1kill -9 <PID>
For zombie processes:
sh -c)1kill -9 <PARENT_PID>
1ps aux | grep hugo | grep -v grep | awk '{print $2}' | xargs kill -9
Use with caution โ this forcefully kills all Hugo-related jobs.
--port 3300, --port 3400, etc.)Makefile targets or shell scripts