-
Notifications
You must be signed in to change notification settings - Fork 30
Uncaught Exception: RangeError: Invalid string length #80
Comments
What are you sending that's that big? That's an out-of-memory error. 🤔 Can you share more details about what the individual span/transaction object looks like and why it's so big? |
Well, it's related to the issue I referred to (https://github.com/kschingiz/meteor-elastic-apm/pull/34) - which is kind of a longer story. We're monitoring a framework called Meteor, which provides the option to send "commands" (they refer to it as calling a method) over the wire. All of those are logged including their data. Imagine calling a Now - one of the packages uses this technology to upload files. It splits the file up into chunks on the server side and then sends partial-upload-calls to the server containing the files content as argument; and this method (and thereby also it's logging including the full parameters) is called very often within a second. This brings this library to crash. It's one side of a coin that this clearly is not as this library was intended to be used, but it also surprises me that this library doesn't have a security layer in place here to prevent the system from crashing. |
I found some resources saying a string in nodejs has a maximum length (nodejs/help#712). It could well be that this already will postpone the problem by such a margin that it doesn't affect us anymore, but I guess it'll come back one day 😄 |
Yes, there is a max string size in JavaScript itself, and there's nothing we can do about that. We do have a bunch of protections in place to avoid crashing the process, but there's not a whole lot that can be done when the process runs out of memory. 🤷♂ |
After posting tons of very big span or transaction object, my process crashed by this exception:
The text was updated successfully, but these errors were encountered: