Shut down server in TensorFlow
<p>When we want to use distributed TensorFlow, we will create a parameter server using</p>

<pre><code>tf.train.Server.join()
</code></pre>

<p>However, I can't find any way to shut down the server except killing the processing. The TensorFlow documentation for join() is</p>

<pre><code>Blocks until the server has shut down.
This method currently blocks forever.
</code></pre>

<p>This is quite bothering to me because I would like to create many servers for computation and shut them down when everything finishes.</p>

<p>Is there possible solutions for this.</p>

<p>Thanks</p>

<p>There's currently no clean way to shut down a TensorFlow gRPC server. It <em>is</em> possible to <a href="http://stackoverflow.com/a/35708349/3574081">shut down a gRPC server</a>, but doing it safely requires additional memory management for all of the in-flight request and response buffers, which would require a lot of additional plumbing (of the worst kind: asynchronous shared memory management...) for a feature that nobody had requested&mdash;until now!</p>

<p>In practice you should be able to use the same <code>tf.train.Server</code> object for many different computations. If this doesn't work for your use case, please feel free to <a href="https://github.com/tensorflow/tensorflow/issues" rel="nofollow">open an GitHub issue</a> and tell us more about your use case.</p>

python machine-learning tensorflow deep-learning grpc