A Rust queue consumer worker starts throwing ‘memory access out of bounds’ exceptions for all invocations after a large number of processed events. Changing concurrency doesn’t help, it seems the worker runtime has a memory leak as all I do in the init is set a log shipper.
{
"outcome": "exception",
"scriptName": "***",
"diagnosticsChannelEvents": [],
"exceptions": [
{
"name": "CompileError",
"message": "memory access out of bounds",
"timestamp": 1691736709675
}
],
"logs": [],
"eventTimestamp": 1691736709675,
"event": {
"batchSize": 1,
"queue": "location-trigger-aggregate"
},
"id": 24
}
All I do in the lib.rs
file for init is
#[event(start)]
pub fn init() {
console_log::init_with_level(Level::Debug).expect("Failed initializing console log");
The main function that handles the queue event should free all memory after it’s done, so isn’t ilkely to cause this.