Regular authentication errors, especially when app traffic is high

Expected behavior

My Forest Admin dashboard loads reliably and stays authenticated, regardless of how many visitors we have on our app.

Actual behavior

Even during periods of low traffic, I’m regularly met with the following screen:

Screenshot 2021-08-10 at 13.47.58

When we have periods of high traffic, this popup is persistent and it takes several goes (could be up to 10-20 times) of hitting “Log in again” or refreshing the page before I can access the dashboard again.

It’s frustrating during periods of high traffic as that’s when we need reliable access to our admin backend.

Is there anything we can do to stop this from happening?

Context

Rails v6.1.4
forest_liana v7.0.0
Postgres v12.7

Hi @Nadia !
The authentication request is failing, could you share the error you are getting in your browser console ?

Hi @Nicolas_Sailly!

Ah, didn’t think to share that, sorry! Here’s what I’m seeing:

I see an error 400, can you check the logs of the request in the network tab ?

Hi @Nicolas_Sailly,

Here’s an example of what I’m seeing:

Ok, do you run your project on multiple instances ? (using a load balancer, pm2…)

It’s run on Heroku, across multiple web dynos.

Can you try to follow this step of the documentation, il should solve your issue :slight_smile:

Edit: If you are on rails here is the documentation

Hi @Nadia !
Did it solve your issue ?

Hi @Nicolas_Sailly,

I’ve been super busy and haven’t had a chance to try it yet, or I would have responded!

I’ll let you know. :relaxed:

It looks like it’s worked! :tada:

Thank you very much, @Nicolas_Sailly! :blush: