Re: lot of "Bad request. The CSRF tokens do not match"

From: Dave Page <dpage(at)pgadmin(dot)org>
To: bw <bwakkie(at)gmail(dot)com>
Cc: PgAdmin Support List <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: lot of "Bad request. The CSRF tokens do not match"
Date: 2020-07-09 08:17:10
Message-ID: CA+OCxoxVHT94nJL=ZEKQwuBfVop2bvF6RsYccNoWzU5dJa-5Bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Thu, Jul 9, 2020 at 9:06 AM bw <bwakkie(at)gmail(dot)com> wrote:

> Hi all,
>
> I am getting a lot of *Bad request. The CSRF tokens do not match.* with
> the following setup on Ubuntu 20.04...
>

...

>
> WSGIDaemonProcesspgadmin user=pgadmin group=pgadmin processes=2 threads=5
> python-home=/data/.envs/pgadmin
>

That line is likely your problem. Change processes to 1 (and maybe increase
threads to 20 or more).

With multiple processes, you have multiple instances of the pgAdmin server
running. Each will have its own connection pool and CSRF tokens etc. so
when a session starts on one process and then later makes a request that
hits the second process, things will go kaboom.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message bw 2020-07-09 09:01:20 Re: lot of "Bad request. The CSRF tokens do not match"
Previous Message bw 2020-07-09 08:06:20 lot of "Bad request. The CSRF tokens do not match"