# MongoDB stubbornly working after attempted shut down with ctrl+c (Windows 10)

**URL:** <https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034>\
**Category:** Node\
**Created:** [July 30, 2022, 11:27pm UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034 "2022-07-30T23:27:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HexagonBen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/hexagonben/32/4219_2.png) [@HexagonBen](https://forum.codewithmosh.com/u/HexagonBen)\
**Post date:** [July 30, 2022, 11:27pm UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034/1 "2022-07-30T23:27:40Z")

</div>

I’m running MongoDB 6.0  
I’m doing the Node + MongoDB course,  
“Handling and Logging Errors” section,  
Part 5, “Express Async Errors”

I’m at the part after downloading and importing the express-async-errors NPM module, where you have to run your node server and then terminate Mongo Daemon, which I ran in command prompt, and I closed with ctrl+c:

 ![Can't shut down MongoD](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/6/6f949999c11c03c7fef912e6cbc31891bf105f2e.png)

But after I shut it down with ctrl+c, my endpoint requests still work for some reason. On postman I submit get requests and they work and return data from the database, which is supposed to be shut down so I can test the error-handling module.

The MongoDB documentation says ctrl+c is how to shut it down, and I tried a bunch of other shut down commands I saw in the documentation and floating around but no matter what I do it just keeps working. I know I could restart my comp to force it to shut down but I really need to know how to do it without resorting to that.

---

<div class="post-metadata">

**Author:** ![mody1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/mody1/32/4241_2.png) [@mody1](https://forum.codewithmosh.com/u/mody1)\
**Post date:** [August 3, 2022, 3:01am UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034/2 "2022-08-03T03:01:33Z")

</div>

i have the same problem xD  
did u figure it out ?

---

<div class="post-metadata">

**Author:** ![HexagonBen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/hexagonben/32/4219_2.png) [@HexagonBen](https://forum.codewithmosh.com/u/HexagonBen)\
**Post date:** [August 3, 2022, 3:36am UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034/3 "2022-08-03T03:36:25Z")

</div>

Nope I gave up. That’s as far as I got with the tutorial.

One thing I learned was always use the exact version of everything that Mosh uses, even when he doesn’t tell you to, otherwise you run in to all sorts of compatibility problems with deprecated features down the road because his Node tutorial is very old.

It also took me weeks to get as far as I did. I’ll probably come back and do the whole tutorial again from the beginning at some point.

If you figure out how to shut down MongoD from the Windows command prompt please let me know! I’ll let you know if I ever figure it out.

---

<div class="post-metadata">

**Author:** ![mody1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/mody1/32/4241_2.png) [@mody1](https://forum.codewithmosh.com/u/mody1)\
**Post date:** [August 3, 2022, 4:09am UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034/4 "2022-08-03T04:09:26Z")

</div>

yeah i understand u  
but there is a problem that i asked some mid Junior friends about if i should use the same old version of node packages in real world applications after the node tutorial and they told me no u shouldnt so i really have a hard time reading the difference in documentation and stackoverflow stuff 🥲💔

ok if i figure out how i will send u  
and if there is any other problem in the tutorial stand with u send me maybe i face the same problem

---

<div class="post-metadata">

**Author:** ![Nazmul](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nazmul/32/557_2.png) [@Nazmul](https://forum.codewithmosh.com/u/Nazmul)\
**Post date:** [August 7, 2022, 4:21am UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034/5 "2022-08-07T04:21:18Z")

</div>

> [@HexagonBen](#):
>
> If you figure out how to shut down MongoD from the Windows command prompt please let me know! I’ll let you know if I ever figure it out.

Hi HexagonBen,

You can shut down MongoD by following these steps:

1. Open Command Prompt/Powershell as Administrator.
2. And run `net stop MongoDB`

---

<div class="post-metadata">

**Author:** ![HexagonBen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/hexagonben/32/4219_2.png) [@HexagonBen](https://forum.codewithmosh.com/u/HexagonBen)\
**Post date:** [August 7, 2022, 4:43pm UTC](https://forum.codewithmosh.com/t/mongodb-stubbornly-working-after-attempted-shut-down-with-ctrl-c-windows-10/14034/6 "2022-08-07T16:43:41Z")

</div>

Thanks! I’ll try that when I go back to the Node tutorial. @mody1 see Nazmul’s answer here!
