Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding a bit about stopping the server processes

  • Loading branch information...
commit 38c1781788fc788fdfb4bff17ab0e0725455cb3e 1 parent ad33201
Zachary Scott zzak authored

Showing 1 changed file with 26 additions and 0 deletions. Show diff stats Hide diff stats

  1. +26 0 book/Deployment.markdown
26 book/Deployment.markdown
Source Rendered
@@ -235,6 +235,32 @@ resides.
235 235 Now you should have successfully deployed your Sinatra application on nginx and
236 236 unicorn.
237 237
  238 +### Stopping the server
  239 +
  240 +So now that you're using nginx and unicorn, at some point you might end up
  241 +asking yourself: How do I stop this thing?
  242 +
  243 +Here's how:
  244 +
  245 + $ ps -ax | grep unicorn
  246 +
  247 +This will output the processes running unicorn, in the first column should be
  248 +the process id (pid). In order to stop unicorn in it's tracks:
  249 +
  250 + kill -9 <PID>
  251 +
  252 +There should be a `master` process which once that is killed, the
  253 +workers should follow. Feel free to search the processes again to make sure
  254 +they've all stopped before restarting.
  255 +
  256 +To stop nginx you can use a similar technique as above, or if you've got the
  257 +nginx init scripts installed on any debian-based system use:
  258 +
  259 + sudo /etc/init.d/nginx stop
  260 +
  261 +That should wrap things up for deploying nginx and unicorn, for more
  262 +information on stopping the server look into `man ps` and `man kill`.
  263 +
238 264 Lighttpd Proxied to Thin {#deployment_lighttpd}
239 265 ------------------------
240 266

0 comments on commit 38c1781

Please sign in to comment.
Something went wrong with that request. Please try again.