since you have mentioned that the migration has happened to WL 10.x . I am guessing that the issue is currently with WL10.x domain.
In normal case when the db pool reaches the max limit (in your case 40) it use to throw [Resource unavailable] exception when the connection request arrived . and then the db pool will be put into Overloaded state
but I'm not sure why it kills the wl server .
please check the server logs while the server is going down . to find the root cause for the shutdown . Wl server usualy says something like this in the logs
<shutdown requsted by <user> > / <JVM called shutdown hook>
the first one is normal shutdown issued by any user . the second one is a JVM overload issue (OOM/Stuck
Thread...)
if possible trigger a thread dump during the issue .