Metadecidim
Sign in

Process

Report a Bug

not yet on protocol

V0.29 Performance Issue with Decidim: "Retry Later" errors with more than 10 concurrent users on a high-spec server

We are experiencing a performance bottleneck with our Decidim v0.29 installation and would appreciate any guidance you can offer.

The Problem: Our platform works perfectly with a few users in a production configuration, but as soon as we exceed approximately 10 concurrent users, all clients start receiving intermittent "Retry Later" error pages. We have confirmed this behavior using Locust for load testing, and we can provide the test results.

1 comment

  1. There's a thread in Matrix about this same topic, and the worarounds provided by @microstudi are:

    (...) it's worth noting that, since v0.25 and the introduction of ActiveStorage, all assets requests generate a hit in rack attack. That is because all asset routes go through Rails before sending you the image.

    There are several ways to handle this, once is to generate static asset routes that can be effectively cached, this is an ongoing process as far as I know.

    For a super-quick solution, if you are using ENV variables you can just increment the number of the var DECIDIM_THROTTLING_MAX_REQUESTS=10000 for instance.

    Also, another common problem is for people using Decidim in organizations, city councils, public places, etc. That's because theses places tend to use a single Internet connection (thus one IP) that is shared with all the user inside. This means that Decidim receive the same IP for several users, even with the forwarding IP well configured (as Hadrien explains).

    A way to mitigate this is to configure exceptions for rack attack in two ways:

    . Skip all active storage routes from being used to calculate rack attacks hits.

    . Skip known IPs from rack attack.

    You can see an example of an initializer doing both things here:

    https://github.com/openpoke/decidim-canodrom/blob/main/config/initializers/rack_attack.rb

    Hope it helps!

    0 votes up 0 votes down

Sign in with your Atmosphere account to comment.