You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've implemented brakes in a Lambda function in AWS, and have seen a gradual performance degradation over the course of about an hour.
We can observe the lambda running slower and slower up until a point where it takes about 10-30 seconds for it to execute, whereas on a fresh startup, requests are processed within a few milliseconds.
Memory consumption appears to increase linearly.
Our usage looks like this:
class Foo extends Service {
init(stuff) {
return super.init(stuff)
.then(res => {
this.getFooCB = new Brakes(
this.getFoo.bind(this), // Bind the scope, or won't have access to class vars
{
circuitDuration: 15000,
timeout: 10000,
waitThreshold:0 // After how many requests should we check?
});
});
}
getFoo(stuff) {
// do some async thing
}
useFoo() {
return this.getFooCB.exec(stuff).then(res => {...});
}
The text was updated successfully, but these errors were encountered:
Hey @marksteele. It looks like you closed this right away. Is this still an issue? Looking at the code, I would be concerned that maybe you are calling init and instantiating a new brakes instance on every request.
Hi,
I've implemented brakes in a Lambda function in AWS, and have seen a gradual performance degradation over the course of about an hour.
We can observe the lambda running slower and slower up until a point where it takes about 10-30 seconds for it to execute, whereas on a fresh startup, requests are processed within a few milliseconds.
Memory consumption appears to increase linearly.
Our usage looks like this:
The text was updated successfully, but these errors were encountered: