-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Closed
Description
- Laravel Version: 5.4.12
- PHP Version: PHP 7.1.0-2+deb.sury.org~xenial+1 (cli) ( NTS )
- Database Driver & Version: psql (PostgreSQL) 9.5.5
(Running on Homestead)
Description:
On running more than 100 tests that use DatabaseMigrations the following error appears:
Illuminate\Database\QueryException: SQLSTATE[08006] [7] FATAL: sorry, too many clients already
Steps To Reproduce:
Run more than 100 tests (methods) using DatabaseMigrations on Postgree (default max connections is 100).
I have created a repository to ease reproduce it: https://github.com/mariomka/laravel-pgsql-too-many-clients-test
- git clone https://github.com/mariomka/laravel-pgsql-too-many-clients-test.git
- composer install
- php vendor/bin/homestead make
- vagrant up
- vagrant ssh
- cd laravel-pgsql-too-many-clients-test
- ./vendor/bin/phpunit
While tests are running you can see Postgre connections count with:
select count(*) from pg_stat_activity;
Or full info with:
select * from pg_stat_activity;
dcro
Metadata
Metadata
Assignees
Labels
No labels