Automatic Restart by AI Agent and zombie processes
I am a beginner. I use Linux Mint. I understand that the Wasp server restarts with every change. I also know about the wasp clean command, but I’ve been running into a problem: when AI agents reboot the server, it seems to leave zombie processes alive, and the server never properly reboots—it hangs with an error.
What is the fix? It requires logging out and logging back in. In short, this removes all zombie processes. However, this is not a practical solution.
I have two dangerous commands that can stop the Wasp servers because Ctrl-C is disabled and won't stop the server manually:
1) pkill -f wasp || pkill -f node // Not recommended
2) lsof -i:3001 -t | xargs -r kill -9 // Not recommended
I need a manual way to reboot the server:
1) Do you have a proper way to manually reboot the Wasp server?
2) Is it possible to enable Ctrl-C for development?
3) Is there a way to make wasp start work again without logging out of my Linux?
No, I don’t have any errors right now. I’m just sharing my experience and the problems I’m facing.
Pls help me solve this problem because it has become a huge problem. (as of Oct 2025. )
7 Replies
Hi @Sky Blue. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Thank you for sharing your experience—this is a known pain point for some Wasp users, especially when zombie processes are left behind after restarts or crashes.
1) Proper Way to Manually Reboot the Wasp Server
The recommended approach is to ensure all Wasp-related processes are stopped before restarting. If you encounter a situation where ports (like 3000 or 3001) are still in use, you can manually kill the processes occupying those ports. The Wasp community suggests the following commands:
This will kill any process using those ports, which are typically the frontend (3000) and backend (3001) servers for Wasp. This is considered safer than using
- Use
pkill -f wasp or kill -9 on all node processes, as it targets only the relevant ports and avoids killing unrelated processes. After running these commands, you should be able to run wasp start again without needing to log out or reboot your machine [Github Issue: Process is already running on port 3000].
2) Enabling Ctrl-C for Development
Normally, Ctrl-C should work to stop the Wasp development server. However, there are rare cases where it becomes unresponsive due to how child processes are managed. This is a known issue, and the Wasp team has worked on improvements to ensure that all child processes are terminated when the main process is killed. If Ctrl-C is not working, using the fuser commands above is the next best manual solution [Github Issue: Process is already running on port 3000].
3) Making wasp start Work Again Without Logging Out
You do not need to log out or reboot your system. Instead, use the fuser commands to free up the ports, then run wasp clean to remove any generated code and cached artifacts:
Then, start your app again:
This sequence should resolve most issues with zombie processes and allow you to continue development without a full logout or reboot [Docs: CLI Reference].
---
Summary:- Use
fuser -k 3000/tcp and fuser -k 3001/tcp to kill stuck processes.
- Run wasp clean before restarting with wasp start.
- Ctrl-C should work, but if not, use the above commands.
- No need to log out or reboot—these steps should resolve the issue.
If you continue to experience problems, please provide more details or error messages, and the community can help further!
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sky Blue, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?In my case Ctr-C has not worked. It has failed 100% of times.
Hey @Sky Blue, not sure I understood everything:
AI agents reboot the server, it seems to leave zombie processes alive, and the server never properly reboots—it hangs with an error.Which server is the agent rebooting? Aren't you working on your desktop? How does the AI agent reboot it, and which zombie processes does it leave behind?
What is the fix? It requires logging out and logging back in.Into what are you logging in and out? Your local machine?
Ctrl-C is disabled and won't stop the server manually:When you say "Ctrl+C" is disabled, do you mean that when you do
wasp start and then Ctrl+C, nothing happens?Hello Sodic . thanks for responding. I use latest version of Ubuntu.
"Which server is the agent rebooting? Aren't you working on your desktop?
How does the AI agent reboot it, and which zombie processes does it leave behind?"
using Gemini with vs code, the agent can auto-reboot the Wasp server after changes, but once the server is running, I can’t shut it down or restart it with Ctrl+C—it fails every time. While this isn’t a concern in production, it’s a problem in development, where frequent restarts are needed. Improper shutdowns also lead to zombie processes, which can build up and cause issues. Not just an agent even without agent i am still running into the same problem. Even with a working code, the server will give errors. as soon as you logout of Ubuntu and log back in then everything will start working.
Into what are you logging in and out? Your local machine?
Yes my linux machine and then it starts working magically. It is clearing out all zombie processes and other issues.
When you say "Ctrl+C" is disabled, do you mean that when you do wasp start and then Ctrl+C, nothing happens? Yes this is exactly what I meant. I need his ability to properly kill and reboot the server but it never works for me. 100% of times it fails. so i need to set something like a developer mode? thanks
When you say "Ctrl+C" is disabled, do you mean that when you do wasp start and then Ctrl+C, nothing happens? Yes this is exactly what I meant. I need his ability to properly kill and reboot the server but it never works for me. 100% of times it fails. so i need to set something like a developer mode? thanks
Ok, got it! Thanks for the explanation and thanks for the patience. I got sick but am now back in action
Right, so the first thing we should figure out is if you can stop other processes with Ctrl+C. Do they also ignore it, or is it just Wasp?
For example, try running (and then stopping with Ctrl+C):
-
sleep 20
- python -m http.server
If these don't work, report back. If they do, try starting and stopping with Ctrl+C:
- An NPM project with nodemon (a different project from Wasp)
- An NPM project with something likenpm start (agan, in a different non-Wasp project)
And then report backSorry for the late reply. I am new here. I got caught up in holidays and I totally forget to reply. Yes you are right there was something wrong on my side. I formatted my linux(not for Ctr+C but it was acting wired). Now Ctrl-C is working perfectly. In short, there is nothing wrong with the OpenSAAS template and it was my Linux acting wired.
Thank You.
Hey @Sky Blue, glad to hear it! Hope you had a nice time on your holidays 🙂
We're here if new problems pop up