哎 数据和web服务怎么能放在一块呢 隐患啊

解决方案 »

  1.   

    是Web当掉
    还是数据库系统oracle当掉
    还是Linux当了呢?如果是oracle当了,查一下里面正在运行的查询吧,可能可以查出来是什么地方死锁了
      

  2.   

    是Web当掉
    log文件查过~看不出明显的问题啊
      

  3.   

    [oracle@lnxRedFlag oracle]$ free
                 total       used       free     shared    buffers     cached
    Mem:       1028332    1021840       6492     137564     159852     524580
    -/+ buffers/cache:     337408     690924
    Swap:      2096220      78052    2018168
      

  4.   

    private void closeConnection() throws CESException {
            try {
                query.closeConnection(CommonManage.CENSORCONN);
            } catch (SQLException se) {
                throw new CESException("ProjectPersonRel.closeConnection(): Error Closing Connection :\n\t" + se);
            }
        }    /**
         * 关闭PreparedStatement对象
         *
         * @param pstmt             PreparedStatement对象
         * @exception               ces.com.exception.CESException
         *                          如果关闭时有错误,将抛出异常
         */
        private void closePreparedStatement(PreparedStatement pstmt) throws CESException {
            try {
                if (pstmt != null) {
                    pstmt.close();
                }
            } catch (SQLException se) {
                throw new CESException("ProjectPersonRel.closePreparedStatement(): Error Closing PreparedStatement :\n\t" + se);
            }
        }    /**
         * 关闭ResultSet对象
         *
         * @param result            ResultSet对象
         * @exception               ces.com.exception.CESException
         *                          如果关闭时有错误,将抛出异常
         */
        private void closeResultSet(ResultSet result) throws CESException {
            try {
                if (result != null) {
                    result.close();
                }
            } catch (SQLException se) {
                throw new CESException("ProjectPersonRel.closeResultSet(): Error Closing ResultSet :\n\t" + se);
            }
        }
    不敢保证,但是我想应该都有的~。很个别的话如何找得出?
      

  5.   

    是什么情况,是不是服务器拒绝服务?
    如果是这样的情况的话。有可能是因为web服务器请求的数据库连接数超过数据库能够提供的连接数。
    web服务器进入等待数据库连接释放的死锁状态。看起来象是web服务器down掉一样。
    如果是这样的话,应该把连接池调小点。或者就是升级服务器了。