When I try to render a large report, multiple pdf page ~700 pages, sometime I get this exception, not sure why. This exception usually occurs when trying to write a document larger than 16MB into MongoDB. In my case, I m not writing anything from MongoDB. I use MongoDB to read my data for the template as well as storing and fetching templates. I also changed my blobStorage to use GridFS. Here is the exception. Kindly help ASAP. Thanks!
2017-05-09T22:30:11.048Z - info: Rendering request 6468 finished in 34 ms requestId=6468
2017-05-09T22:30:11.887Z - info: Rendering request 6438 finished in 32544 ms requestId=6438
2017-05-09T22:30:28.921Z - error: Error when processing render request Error during rendering report: Attempt to write outside buffer bounds RangeError: Attempt to write outside buffer bounds
at Buffer.write (buffer.js:741:11)
at serializeBoolean (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:143:48)
at serializeInto (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:753:17)
at serializeObject (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:300:18)
at serializeInto (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:608:17)
at serializeObject (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:300:18)
at serializeInto (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:766:17)
at BSON.serialize (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/bson.js:49:27)
at Query.toBin (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/connection/commands.js:143:25)
at executeWrite (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:78:20)
at WireProtocol.update (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:93:3)
at Server.update (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/topologies/server.js:561:35)
at Server.update (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/server.js:386:17)
at updateDocuments (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/collection.js:1041:19)
at updateMany (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/collection.js:1001:3)
at Collection.updateMany (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/collection.js:986:44)
at Promise.post (/usr/lib/node_modules/jsreport/node_modules/q/q.js:1161:36)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/jsreport/node_modules/q/q.js:788:41)
at /usr/lib/node_modules/jsreport/node_modules/q/q.js:1391:14
at runSingle (/usr/lib/node_modules/jsreport/node_modules/q/q.js:137:13)
at flush (/usr/lib/node_modules/jsreport/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9) requestId=1
2017-05-09T22:30:28.943Z - error: Error during processing request: https://eu.report.certifi.viavisolutions.com/api/report details: Error during rendering report: Attempt to write outside buffer bounds RangeError: Attempt to write outside buffer bounds
at Buffer.write (buffer.js:741:11)
at serializeBoolean (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:143:48)
at serializeInto (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:753:17)
at serializeObject (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:300:18)
at serializeInto (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:608:17)
at serializeObject (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:300:18)
at serializeInto (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/parser/serializer.js:766:17)
at BSON.serialize (/usr/lib/node_modules/jsreport/node_modules/bson/lib/bson/bson.js:49:27)
at Query.toBin (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/connection/commands.js:143:25)
at executeWrite (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:78:20)
at WireProtocol.update (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:93:3)
at Server.update (/usr/lib/node_modules/jsreport/node_modules/mongodb-core/lib/topologies/server.js:561:35)
at Server.update (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/server.js:386:17)
at updateDocuments (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/collection.js:1041:19)
at updateMany (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/collection.js:1001:3)
at Collection.updateMany (/usr/lib/node_modules/jsreport/node_modules/mongodb/lib/collection.js:986:44)
at Promise.post (/usr/lib/node_modules/jsreport/node_modules/q/q.js:1161:36)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/jsreport/node_modules/q/q.js:788:41)
at /usr/lib/node_modules/jsreport/node_modules/q/q.js:1391:14
at runSingle (/usr/lib/node_modules/jsreport/node_modules/q/q.js:137:13)
at flush (/usr/lib/node_modules/jsreport/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)