tls: oversized record received
I'm using transporter to synchronize some data to a cloud elastic search provider that only offers an HTTPS interface.
I'm getting the following error:
transporter: CRITICAL: elasticsearch error (Post https://{{ my cloud provider }}/_bulk: tls: oversized record received with length 20527)
The error appears to be arising from within the crypto/tls library in crypto/tls/conn.go. This library won't allow payloads above maxCiphertext = 16384 + 2048 (encoded in a constant).
I suggest performing multiple requests to work around this issue.
This is probably actually an issue with the elastigo library.
Yeah, it does sound like an issue with that lib. we keep a buffer in the mongo library that's tunable. we could probably work around the bug in elastigo by doing something else, by capturing the sizes of documents as they're dumped, and forcing a flush periodically
good catch btw
Would you do something like adding a size tracking variable to elasticsearch.go, incrementing it by the size of message.Msg in applyOp, then calling e.indexer.Flush() when it gets within a certain amount of maxCipherText?
Oh, but you'd have to track the bulk commands as well as just the documents.
it might make sense to store the size of the document in the message itself, have the transporter source record that and yeah elasticsearch would have to keep a running tally of the cumulative size, and flush when it's too big
It's interesting because that's just the maximum TLS fragment size, not document size. A document can clearly be bigger than that. I wonder why this is occurring.
rbwendt ... does the error happen as soon as you start the transporter or does it occur later while it is processing?
It happens a fair bit later. It seems like it has lots of time to collect data from mongo and then the error occurs.
@rbwendt are you still seeing the issue? We updated the elastigo library with version 0.1.1.
@jipperinbham Sorry I no longer use this application, and I don't have the time or resources to set up my old branch and test this out for you.
I am currently seeing this same issue. The error output occurs for me multiple times about 50 to 60 seconds after I startup transporter.