POOL_SIZE is a variable that is set in the config files. Phoenix seems to give it a default value of 10 always.
However I was working on an application that had been deployed to heroku and the POOL_SIZE variable was set to 18. Everything seemed to work as expected until we tried to run a seed file.
When we were running the seed file we were getting the following error
Postgrex.Protocol (#PID<0.259.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role.
I noticed that the phoenix default was 10 so updated that value on heroku and and ran the seed file again, but this time it worked.
Opening this issue so that I can document anything I learn about how POOL_SIZE works (in general and on heroku) here but if anyone has an knowledge please comment.
POOL_SIZE
is a variable that is set in the config files. Phoenix seems to give it a default value of 10 always.However I was working on an application that had been deployed to heroku and the
POOL_SIZE
variable was set to 18. Everything seemed to work as expected until we tried to run a seed file.When we were running the seed file we were getting the following error
I noticed that the phoenix default was 10 so updated that value on heroku and and ran the seed file again, but this time it worked.
Opening this issue so that I can document anything I learn about how
POOL_SIZE
works (in general and on heroku) here but if anyone has an knowledge please comment.