hi all, urgently anyone know why this happened.. i have a servlet recieves more than 100 requests per second and when it go to Database side it gives that problem.. any professionals have angel solutions plz BLESS ALL [ October 12, 2005: Message edited by: Bear Bibeault ]
Jeanne Boyarsky
,
author & internet detective
staff
Hi First guess is that you are working with transaction in your code and that's creating a problem after the number of users are increased. Please check your transaction code and timeout period of the the transaction. Please keep a eye on how your database is responding when this problem occurs. Check for the locks at the database end.
Let me know.
Regards Makarand Parab
Jeanne Boyarsky
,
author & internet detective
staff
hi Makarand and Jeanne thi is the method that the exception apears in it: public String checkIsUserSubscribe(Connection conn, String phoneStr, int pkgId) throws SQLException, ClassNotFoundException { cat.debug("now we are in checkIsUserSubscribe method"); cat.debug("the phoneStr= "+phoneStr+", pkgId= "+pkgId); //Connection conn = getConnection(); int upId = 0; String upIdStr=null; String call = "{? = call checkusersubscription(?,?)}"; CallableStatement cstmt = null;
try { // conn.setTransactionIsolation(conn.TRANSACTION_SERIALIZABLE); cat.debug("conn.getTransactionIsolation="+conn.getTransactionIsolation()); cstmt = conn.prepareCall(call); //1 it means the first ? & so on.. //Types.BIGINT: the kind of it cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.setString(2, phoneStr);
cstmt.setInt(3, pkgId);
cstmt.execute(); // upId = cstmt.getInt(1); upIdStr=cstmt.getString(1); // cstmt.close(); // conn.commit(); } catch (Exception e) { cat.error(e); // SENDING THE EXCEPTION try{ DispatcherSupport dispatcherSupport=new DispatcherSupport(); dispatcherSupport.sendURL(e+""); } catch(Exception except) { cat.debug("Exception in sending the exception"+except); } //END SENDING THE EXCEPTION
} finally{ if (cstmt != null) { cstmt.close(); }
try { //poolMng.freeConnection(poolName, conn); } catch (Exception ee) { cat.error(ee); // SENDING THE EXCEPTION try{ DispatcherSupport dispatcherSupport=new DispatcherSupport(); dispatcherSupport.sendURL(ee+""); } catch(Exception except) { cat.debug("Exception in sending the exception"+except); } //END SENDING THE EXCEPTION
}
return upIdStr; }
}
and the exception in log file appears like that:
DEBUG HandlerDAO -now we are in checkIsUserSubscribe method DEBUG HandlerDAO - the phoneStr= 9656953235, pkgId= 270 ERROR HandlerDAO - java.sql.SQLException: ERROR: current transaction is aborted, queries ignored until end of transaction block