title: Tensorflow Serving: Large model, protobuf error
body: <p>I am trying to make serve a big (1.2 GB in size) model with Tensorflow Serving, but I am getting a:</p>
  
  <pre><code>2017-12-02 21:55:57.711317: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:236] Loading SavedModel from: ...
  [libprotobuf ERROR external/protobuf_archive/src/google/protobuf/io/coded_stream.cc:193] A protocol message was rejected because it was too big (more than 1073741824 bytes).  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
  2017-12-02 21:55:58.563507: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:284] Loading SavedModel: fail. Took 852178 microseconds.
  2017-12-02 21:55:58.563567: E tensorflow_serving/util/retrier.cc:38] Loading servable: {name: 2 version: 2} failed: Data loss: Can't parse .../saved_model.pb as binary proto 
  </code></pre>
  
  <p>I read through a few related issues on Github from a few years ago, but ultimately it turned unrelated, since Serving is using the C++ version of the protobuf. There is little information on deploying large models with Serving, so any information would suffice.</p>
  
  <p>Tensorflow Serving was compiled on the host machine, so was the model, but using python3 (I wonder if it has to do with anything at all).
  Is there a quick fix for this, or I have to dig through the Serving C++ sources and increase the size of the message? </p>
  
  <p><strong>Edit per request in the comments:</strong> </p>
  
  <p>I save the model according to the official tutorial. The reason why the model is so big is that I have an embedding layer saved along. Here is the saving code anyway:</p>
  
  <pre><code>export_path = 'model/1'
  builder = saved_model_builder.SavedModelBuilder(export_path)
  
  signature = predict_signature_def(inputs={'input': input},
                                    outputs={'sent': output})
  
  
  builder.add_meta_graph_and_variables(sess=session,
                                       tags=[tag_constants.SERVING],
                                       signature_def_map={'predict': signature})
  builder.save()
  </code></pre>
  
  <p>The model is read by a compiled TF Serving from GitHub on a Ubuntu 16.04 host. </p>