Skip to content

Exceeding actor limit kills your applicationΒ #951

@mlh758

Description

@mlh758

We hit the default actor limit of 100 during a feature rollout in our application. We also had a flipper.rb registering some things and a memoize:

Rails.application.configure do
  config.flipper.memoize = ->(request) { !request.path.start_with?("/assets") }
end

Because of that memoize, and because Flipper throws when you hit that 100 feature limit, our health checks started failing since those came through on an http endpoint. This caused our load balancer to move all app instances out of rotation effectively bringing down the whole app.

We have monitoring, realized what was going on, and immediately removed one of the actors we added in the Flipper cloud UI. However, the app couldn't start to sync so it didn't recover automatically. We have another deployment that is just used to access a production console that doesn't boot the same way so I got into that and tried to invoke Flipper.sync. However, that also failed with the error about having more than 100 actors so I couldn't sync it away even after removing an actor.

We removed a row from the the feature flag table in the DB manually and then tried to sync and we still got the error. There are definitely only 99 actors now:

Image

We then had to hotfix an increase to the limit.

There has to be a better way to enforce that limit than causing all invocations of Flipper to fail, even the ones that you might use to get back under the limit.

Flipper 1.3.4
Flipper ActiveRecord 1.3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions