you have to edit this file:
/var/lib/postgresql/data/postgresql.auto.conf
instead of this:
/var/lib/postgresql/data/postgresql.conf
that file by default is:
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
max_connections = '10'
change max_connections variable to something like 100.