Increase the number of connections¶
- Run the command
sed -i s/'max_connections = 300'/'max_connections = 100'/g /etc/postgresql/9.Х/main/postgresql.conf
Where 9.x - your version of PostgreSQL. You can quickly learn the versionby running the command
sudo staffcop info
Or
- Open the configuration file with the command
sudo nano /etc/postgresql/9.Х/main/postgresql.conf
- Press Ctrl+W, input max_conn and press Enter
- Change the value from 100 to 200
- Press Ctrl+O for saving, then Ctrl+X for escaping
- Restart PostgreSQL with the command:
sudo service postgresql restart