Hi, thx for reply.
I moved to c3p0, but it didn't solve the problem. Anyway thx, iIam gonna to use c3p0 from now. I found out, that a deadlock it is connected with one select, which is for some reason written in HQL and not in criteria. It is select throughts many tables, something like
String select = (p_isCount ? "select count(p) " : "select p" )+" from Game p " + "inner join p.gamePlayerArray q " + "left join "+fetch+" q.gameUser gu " + "left join "+fetch+" gu.eloSimpleList e " + "left join "+fetch+" gu.userData u " + "inner join p.gamePlayerArray q1 " + "left join "+fetch+" q1.gameUser gu1 " + "left join "+fetch+" gu1.eloSimpleList e1 " + "left join "+fetch+" gu1.userData u1 " + "where (p.isLongTermGame = true ) and (p.result = '-1') and (index(q) = 0 and index(q1) = 1) and (q.id <> q1.id) " + "and (gu.gameUserID <> gu1.gameUserID ) and (u.userID <> u1.userID) " + "and ( index(e) = 1 and index(e1) = 1) and (e.id <> e1.id) ";
+ many other conditions.
And this select works on my home environment, but on linux server, it does not. In my opinion, there must be some bad driver on server mysql (Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) using readline 5.2), which causes deadlock. in fact, this select is slow too much, so i have to find out how to rewrite it. But for now, I need help. Is it database problem? is it possible hibernate configuration problem? what should i do. thx.
|