Proper way to stop process
When I stop the wasp process developing locally(opensaas), using ctrl-c in iterm, the process keeps running in the background. What is the proper method for stopping the local dev env? Thanks!
5 Replies
Hi @3ghan. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To stop the Wasp development environment, you can use the
ctrl+c
command in your terminal. This should terminate the process. However, if you find that the process is still running in the background, you might be experiencing a known issue where the Node.js server remains running on port 3000 even after the Wasp process ends. This can happen in certain situations when Wasp crashes (source (https://github.com/wasp-lang/wasp/issues/198)).
If you're unable to stop the process using ctrl+c
, you might need to manually kill the process. You can do this by finding the process ID (PID) of the process that's running on the port Wasp uses (e.g., 3000), and then using the kill
command to stop it.
Here's a general way to do this:
1. Use the lsof
command to find the PID of the process running on the port Wasp uses. Replace 3000
with the port number if it's different:
2. Look for the PID in the output of the above command.
3. Use the kill
command to stop the process, replacing PID
with the actual PID:
Please note that this is a general solution and might not work in all cases. If you're still having trouble, it might be a good idea to open an issue on the Wasp GitHub page (https://github.com/wasp-lang/wasp/issues) or ask for help in the Wasp Discord community (https://discord.com/channels/686873244791210014/1179895919471247490).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @3ghan, 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?ok kapa, that's what I've been doing
It should stop completely! But we did notice that some users had some stuff keep running, hadn't had much luck consistenly replicating it though. Could you provdie us with more info on your system? OS, node version, wasp version, anything else that you think we might find interesting.
thanks! ya, Mac OS 13, iterm, wasp 0.13.2, it it killed the process, but released the console before it had maybe? but then previously I had several spun up that had been running in the background that I had to manually kill. No big deal, just didn't see any documentation about preferred stopping method so was wondering if I was stopping wasp wrong
No worries, yeah we don't have a special way, just CRTL-C, but still, there shouldnt' be anything left over running. We had this issue long time ago but though tit was fixed! I reoepned it now here and added your input: https://github.com/wasp-lang/wasp/issues/198 .
Just as some extra info: what are the processes that are left running? Can you provide any more info on those: do they maybe occupy any ports, do you know their names?