I recently had to troubleshoot an issue with a Dynamics GP third party product that would hang with the error:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
Please note the phrase "prior to obtaining a connection from the pool". This is not a command timeout, it is a connection timeout due to a lack of available connections in the application's connection pool.
To confirm this problem, I ran the following SQL query that I found on some helpful forum post (don't recall where):
This query produces a very nice result set that allows you to quickly and easily see active SQL connections.
This problem occurred because the application was not properly closing its connection as it looped through hundreds of records.
The query helped me quickly confirm the issue and point the developers to the source of the error.
UPDATE: Please check out David Musgrave's related post about how this problem can occur with VBA modifications in Dynamics GP: