Forums Register Login

current transaction is aborted, queries ignored until end of transaction block

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
Hanihanan,
Can you reproduce the problem? Does it happen with 1 user? 2 users? Do you have a stack trace?
+Pie Number of slices to send: Send
it happens for more than 100 users of 2000 request
how can i avoid this problem plz
thank you for your caring
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Hanihanan,
I agree with Makarand. The only other place that may yield more information is the stack trace.
+Pie Number of slices to send: Send
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

thanks
+Pie Number of slices to send: Send
Hi
i don't see conn.rollback() anywhere in your code. Please put the same in the exception block and then give a try.

Regards
Makarand Parab
No, tomorrow we rule the world! With this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1649 times.
Similar Threads
InitialContext did not implement EventContext
Not able to add values in a database
questions?
Transaction through EJB3
Transaction propagation in EJB
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:40:47.