Memory Leak in Serverless-Offline since 6.8.0
There is a memory leak in Serverless-offline which leaks memory after an endpoint is invoked. Fortunately, there is a simple workaround for this, per the linked comment.
Add the --allow-cache option if running from CLI or edit serverless config to add allowCache: true to Serverless-offline options.
V2 Uses Locally Installed Package Over Global Package
This caught us unaware. CI pipeline does npm -i g serverless to install v2.x but package.json specified an older v1.x version.
I couldn’t figure out why it was using an older version until coming across the v2 blog post describing this breaking change - if both a global and local install is available, the local one will be used.
Cloudformation Problems
Serverless framework uses Cloudformation under the hood unfortunately. This is an issue because:
- Cloudformation has a limit of 500 resources in a stack, easily reached if developing in a monolithic repo
- Deployment may fail sometimes due to exceeding the rate limit of the cloudformation API. This issue has not yet been fixed.
These issues should be resolved if using Serverless Components