Open the configuration file with the command
sudo nano /etc/postgresql/11/main/postgresql.conf
Press Ctrl+W, enter max_conn press Enter
Change the value from 100 to 300
press Ctrl+O to save, then Ctrl+X to exit.
Restart Postgresql with the command:
sudo service postgresql restart