Monday, February 11, 2008

Things I've learnt today

So today, I finally found out why The Application was hanging randomly. Oh it has been doing it a few times, but somehow either I get distracted by another pressing crisis or it just goes away. But today, it decided to rear its ugly head, and what best time to do so but at 6pm?
Sessions shouldn't be the problem, I thought. After all I AM closing the query session. The account with fewer contacts was fine too. After some debugging, I found the location of the hang, an innocent query statement which had been called a number of times with no problems at all. My initial gut feel was that it was a null pointer somewhere, but after staring at the innocent function, I decided, on a whim, close to 715, to increase the connection pool. Being the lavish sort, I bumped it up to 2000, from a meagre 10. Ran the test case again, and it didn't hang. Yay go home!
Of course... Still need to look into it. The solution is simple. Not enough Vespine gas. Well that belies a bigger problem. You're saying, 1 user with 20 over contacts can't survive using a connection pool of 10? I don't know how Hibernate manages its connections, but I think 10 should have been enough. Also, The Application is issuing a distressing amount of queries, repeated ones too. It shouldn't be doing that. Well I guess that's the penalty of designing without a database and tacking it on later... Whoever said grafting was easy?

No comments:

Post a Comment