When running gatsby develop, the usual ^C (Control + C) shortcut to quit the daemon stops working. The character sequence is printed to the shell, but the daemon continues. No error message is shown. Sending a SIGKILL signal to the process works to stop it.
Unknown. This is intermittent.
The process is terminated.
The process continues running.
System:
OS: macOS High Sierra 10.13.4
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.3.0 - /usr/local/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 67.0.3396.79
Safari: 11.1
npmPackages:
gatsby: ^1.9.252 => 1.9.252
gatsby-link: ^1.6.28 => 1.6.39
gatsby-plugin-google-tagmanager: ^1.0.17 => 1.0.17
gatsby-plugin-react-css-modules: ^1.0.9 => 1.0.15
gatsby-plugin-react-helmet: ^2.0.1 => 2.0.8
gatsby-plugin-resolve-src: ^1.0.0 => 1.0.0
gatsby-plugin-segment: ^1.0.2 => 1.0.2
gatsby-plugin-svgr: ^1.0.0 => 1.0.0
gatsby-plugin-typescript: ^1.4.19 => 1.4.19
gatsby-source-contentful: ^1.3.46 => 1.3.46
gatsby-source-lever: ^1.0.9 => 1.0.9
npmGlobalPackages:
gatsby-cli: 1.1.50
gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A
I comment this before creating a new issue. I have a similar behaviour where the Ctrl-C (and actually any input) seems unresponsive. The steps to reproduce is easy (tested on the tutorial with gatsby version 1.1.58 on a linux 4.9.107-2-MANJARO x86_64):
gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world
cd tutorial-part-one
gatsby develop
And then stop the processus with the command Ctrl-Z and putting back in the foreground with fg. The processus is now unresponsive. Let me know if it is completely unrelated and I need to create new issue.
@coreyward if you're able to reproduce the steps causing this, that would be very helpful.
@pierre-jean it sounds like you can consistently reproduce the problem on your system? We'd love any help in tracking down the cause.
@m-allanson Yeah, not really sure how to get more info on what's going on but I'll let you know if I find any more info. May also be related to #5846 (high node CPU usage when running gatsby develop).
Also, @pierre-jean I do have the same issue you describe: when ^C stops working, if I background (^Z) and fg the process it no longer responds to requests or terminal input.
When the process is behaving normally, backgrounding the process has the effect of preventing requests from being handled; when the process is resumed requests are served, but terminal input is ignored (including attempts to background the process again).
Had the same issue with node 10.4.1. After upgrading to 10.7.0 it seems to have gone away.
I spoke too soon. It's still happening. Seems to be after it's been running a while.
Bummer. I haven't run into the issue in Gatsby 2.0.0-beta in the last ~8–10 working hours with it, so it's possible there's a fix in there.
@coreyward Seems to work with 2.0.0-beta. Been running for days without problems. Thanks!
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!
i have the same problem, qutting the cli, and the site still running on localhost, even in private browser. everything is up do date. Does anyone have in idea, quite annoying :(
@zilahir this is not a gatsby cli issue per se. During my time with gatsby, i've encountered this issue inumerous times. Either while using it with windows, ranging from windows 7 to windows 10 and also fedora or ubuntu/xubuntu and linux mint. The issue here is that depending on the workload your system is under and also if the console/terminal buffer is filled and/or in the process of being dumped, or also if the process scheduler is working overtime(pardon the bad pun), this issue might arise. Even with the current ecosystem of cpus/memories and so on. For me what always worked was to free up the most ammount of resources i can, wait a bit and issue ctrl+c twice and that clears it right up.
@jonniebigodes I have plenty of resources free so it's definitely a gatsby issue for me. I don't encounter this problem with other tools either.
@wulffeld expanding on what i've said. While using the latest angular-cli for a project i was working on. The same problem happened here. Adding "assault to injury" (pardon the bad pun) but i had to touch in the electron cli also. And i got the same issue. What leads to me to believe that this is not actually a gatsby issue, like i said before, but more of os+node+package dependencies implementations, and gatsby, angular-cli and other suffer from the same symptoms. Unless node and the way some packages are fine tuned. This kind of problems will continue to happen.
This is most likely happening because a terminal process that you cannot see or close is running somewhere. Closing out of anything with terminal access will probably solve it.
I ran into this issue using MacOS and here is how I solved it. I believe the cause was an open terminal in VSCode. Basically, I ran gatsby develop from the VSCode terminal, and closed it to save screen space. Thus, I could not exit by closing the OS terminal, and CtrlC wasn't doing anything. Reopening a terminal in VSCode was the same. I tried to run gatsby develop from the terminal, but ctrl c still did not work. So, I
Upon refreshing the browser, I had found that the node was no longer functional. From here I was able to simply restart the server and continue along my way, with Ctrl C working again.
Most helpful comment
This is most likely happening because a terminal process that you cannot see or close is running somewhere. Closing out of anything with terminal access will probably solve it.
I ran into this issue using MacOS and here is how I solved it. I believe the cause was an open terminal in VSCode. Basically, I ran
gatsby developfrom the VSCode terminal, and closed it to save screen space. Thus, I could not exit by closing the OS terminal, and CtrlC wasn't doing anything. Reopening a terminal in VSCode was the same. I tried to rungatsby developfrom the terminal, but ctrl c still did not work. So, IUpon refreshing the browser, I had found that the node was no longer functional. From here I was able to simply restart the server and continue along my way, with Ctrl C working again.