Re: [Classifier4j-devel] Update Word Probability Break Down
Status: Beta
Brought to you by:
nicklothian
From: Matt C. <MCo...@my...> - 2003-11-12 17:38:59
|
Oh! Happy Day! After I reconstituted dbTest.java (attached) to open and close the database connection each iteration as updateWordProbability does, the exact same error occurs at exactly the same time (around 3900 iterations). This is without using any classifier4J code. So, now the questions arise... 1) Is this problem still somehow isolated to my configuration. I would love it someone could reproduce this problem. 2) is this behavior somehow by design and if so, is there a setting to be altered. 3) if this problem is not isolated to my environment, how has gone undetected. Seems doubtful that no one has attempted to classify teachMatch() a 4000+ word document, or maybe it is possible. 4) if this problem is not limited to my configuration, what is to be done about it. It was suggested that I "might" want to implement connection pooling in my own code. It seems to me, in light of this issue, classifier4J needs to implement connection pooling internally? Is this possible? 5) Meanwhile, any hints on implementing connection pooling in conjunction with classifier4J would be greatly appreciated. I really wish I had some idea what I was talking about... Matt Collier RemoteIT mco...@my... 877-4-NEW-LAN -----Original Message----- From: "Matt Collier" <MCo...@my...> To: cla...@li... Date: Wed, 12 Nov 2003 11:07:04 -0600 Subject: Re: [Classifier4j-devel] Update Word Probability Break Down > Is it correct to say that our database connection is getting setup and torn > down each time updateWordProbability is called? > > From what I gather, this is not good practice to begin with. Opening and > closing a database connection 60-80 times per second has to be taxing. As I > understand it, this is where connection pooling comes in. > > I wonder if JDBC might have some protection mechanism build in for clients > that go haywire. Perhaps it closes connections for processes that open and > close connections too many times. Maybe it just fails. > > AH HA! This is a diffence between my dbTest.java and connect.java. I am not > connecting and disconnecting on each record. I will rebuild this to test. > > I don't know the first thing about how to implement connection pooling to > begin with, much less in this conext, but I guess that's what I'll start > working on! > > BTW, I've narrowed the error to the call to connectionManager.getConnection() > in updateWordProbability. I have increased the exception handling to produce > the following information: > > SQLState: 08S01 > VendorError: 0 > NextException: null > > SQLState 08S01 = mySQL error ER_BAD_HOST_ERROR according to: > > http://mysql.mirror.trueserver.nl/doc/en/Error-returns.html > |