Hey people, we are facing the following issue, and would like to get some advice about what we are doing wrong or what we are missing.
We had a nodeJS api running in a single instance machine, on that API we also have some workers running each amount of time. We wanted to upscale the machine adding a 2nd instence, and from that point out API start breaking the DB pool connections. I thought it was related with the fact of having bot workers running on both machines at the same time, so I did remove temporarily the workers to discard that and also increase my postgres DB pool configuration. After those changes from time to time when I do request to the API to often, I still got the DB timeout pool error Error: Connection terminated due to connection timeout
I wonder how to setup my machiens in order to both of them connect with the postgres DB without affecting the pool conenction, which is very large considering this is not in production and I could reproduce it just with few requests to the API (again, only happening with both machines up and running).
Thanks for any advice you might have!