authelia: High memory usage in docker w/ file-based user database

I’ve noticed an inordinate amount of memory usage reported following successful authentications when running Authelia inside of a docker container and utilizing a file-based user database.

Before authentication:

CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
01aa33590ab0        authelia            0.00%               11.09MiB / 15.41GiB   0.07%               1.18kB / 0B         0B / 0B             11

After authentication:

CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
01aa33590ab0        authelia            0.01%               1.049GiB / 15.41GiB   6.81%               22.7kB / 4.98kB     0B / 0B             11

I am using the default password hashing configuration (argon2id w/ default settings). It’s possible that the libraries used to provide this configuration are not properly releasing memory after it has been allocated.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Hello @726a67 , thanks for reporting that issue. As discussed, this issue is likely due to Argon2 library not releasing memory properly after hashing. cc @james-d-elliott, @nightah .

We need to have a thorough look at that issue but if you cannot wait, a workaround would be to use sha512 as your password hashing algorithm but it would require resetting passwords of all users unfortunately.

Stay tune.