I needed a bit of research but it looks like the error was caused by one of our models which defined the class method default_role
. The problem with the naming of this method is, that is named like the method which rails uses to return the default role which is also named default_role
.
Now whenever our model wanted to access one of the connections from the connection pool, the role for the searched connection pool was nil
since we overwrote the rails method in our model. This led to the above error that no connection for the '' role was found.