Does Scala slick have timeout setting?

2019-07-24 14:46发布

问题:

I noticed in Play! there are couple of settings I can put in application.conf to specify the connection timeout. Since Play! directly leverages Scala slick, I thought there should be similar settings in Scala slick as well, however I cannot find any reference for it so far. I would be surprised if it is unavailable yet.

回答1:

IIRC you configure the connection pool with the Play settings. If you use Slick with a connection pool (Database.fromDataSource) you can configure the timeout in the connection pool. It's nothing Slick specific.