Internal and external parameters based database connection pool monitoring and management method and apparatus

The invention discloses an internal and external parameters based database connection pool monitoring and management method and apparatus. The internal and external parameter based database connection pool monitoring and management method comprises a step of monitoring an external parameter of a database server and making a primary judgment for the busy degree of the database server, a step of obtaining average connection throughput of SQL statements in database connections and an idle time ratio of connection of a database connection pool, and a step of distributing and releasing a database connection number by a MAX management parameter distribution policy according to the obtained average connection throughput and idle time ratio when receiving a request of obtaining the database connections by an application, automatically adjusting an initial value of MaxIdleTime according to a business peak and returning the value to the application for use. The purpose of avoiding waste of database connection resources is achieved.