private static void clearClosedConnection() {
        long time = System.currentTimeMillis();

        if (time < lastClearClosedConnection) return;//如果用户改了系统时间，那么直接返回
        if (time - lastClearClosedConnection < checkClosedConnectionTime) return;

        lastClearClosedConnection = time;

        //begin check
        Iterator it = notUsedConnection.iterator();
        while (it.hasNext()) {
            Connection conn = (Connection) it.next();
            try {
                if (conn.isClosed()) it.remove();
            } catch (SQLException e) {
                e.printStackTrace();
                it.remove();
            }

        }

        //make connection pool size smaller if too big
        int decrease = getDecreasingConnectionCount();
        if (notUsedConnection.size() < decrease) return;
        while (decrease-- > 0) {
            Connection conn = (Connection) notUsedConnection.removeFirst();
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }