When SSH connection to DigitalOcean closes, server doesn't respond any more!?

  • Posted November 27, 2014

I’ve got a negroni server (for Go) running on CentOS and have an nginx proxy set up as well. When the command line ssh connection to my DigitalOcean server is open, the server works and I can call the endpoints, but as soon as I close it, it’s like the server shuts down or something! I can no longer get any responses…

Just to provide more information: the way I start the server is by doing “go install myApp” and then “myApp &” to start the server…

Any ideas what I’m missing?

Any help is much appreciated, thank you in advance!


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


You will know if your server shuts down if you could no longer contact it using ping or ssh, among others.

Reading your situation, my best guess was that your GO app stopped running because:

You run it using a user account that logged in on a TTY. But once the user account logs out (as in your case, i.e., you closed your SSH connection) or the TTY session closes, all child processes that are run by that user on that particular session will be stopped too even when you specifically said that a process should continue running the background (&).

In order to continue running a process in the background for a user logged in on a terminal (TTY), you could run the command with nohup. So in your case, it would be:

nohup myApp &

Try it out.