I have a simple AWS Lambda script running that uses the Node SDK (3.0) to do an insert.
Everything works fine for about 2 hours, then I get the following unhandled promise rejection error:
Error: LCB_ERR_TIMEOUT (201): A request cannot be completed until the user-defined timeout fired
Re-deploying the lambda function solves the problem for another 2 hours, then the same problem with the same error re-occurs.
In the lambda function, I’m creating references to my cluster, bucket and collection at the top of the function, outside of the handler function - this is recommended as far as I can see.
I can’t see anyway to ‘release’ the connection once the function concludes.
I’m not really sure what’s going on here…
Can anyone help please?