Issues pulling data from sync gateway, "received invalid doc ID from _changes"

That’s normal. It’s called a “long poll” or “hanging GET” — a type of HTTP push notification. The client issues a request to _changes, but the server waits until there’s new data (i.e. a change has occurred) before sending a response. A long delay is expected if the client replicator has already ‘caught up’ (downloaded all current docs) and there are no new docs for it on the server.

So the real issue here is why you’re not able to pull data on the production server. Is the data on the two identical? If not, are you sure the user accounts and channels are set up such that the client has data accessible to it?