Re: java app shuts down Informix Server
Posted in 2003
I have been away on vacation, but did read through all the comments that were made and I appreciate everyone's feedback. Like I said, I am not to blame the database server for what has happened, but from what I have been told it may have been simply a network issue. I have seen java act strange when a network connection is lost in the middle of a process on other databases as well so I will assume it was that issue, but will continue to investigate any problems. Thanks again and happy new year. "Mel Haynes Jr" <mhaynesjr@hotmail.com> wrote in message news:vu40kektorau24@corp.supernews.com... > Hi all, > > I am getting reports from a customer saying my Java application is causing > the Informix server to crash. He reports that it started causing problems > when they started processing large amounts of data ( millions of rows? ). > They have had to restart the Informix server several times to get the > processing complete. What he does is restart the database and then run the > process again. After 4 tries, it seems to complete. So my guess is after a > certain amount of data, the Informix server gets unhappy. I am happy to have > my java app take the blame, but nothing is giving me any clues as to why its > freezing the server. Here is my app setup: > > I am using the JDBC driver from IBM( the latest one from like June 03 or > something ). I am very suspicious of this driver. I am trying to convince > customers to migrate to a better JDBC driver like DataDirect, but I need to > be able to say the JDBC driver is causing the problems. > > Informix Server 9.3 on an HP machine ( not sure what type, but this problem > happened on a Sun Solaris as well ). > > The app they are running is fairly simple. It opens a cursor ( SELECT * FROM > Table WHERE X=Y ). That Query may result in the million+ rows, but I use a > cursor so its in a loop: > while(rs.next) { > ... do stuff ... > } > > rs.close() > > The bizarre part is the exceptions java returns points to the top of the > loop ( while( rs.next() ). Not anything fancy and it seems to run through > many rows before it even throws an exception. The other part it crashes is > at that rs.close() statement. So its not throwing any exceptions at any > logic portion of the code and the exceptions that are being thrown are no > help to anyone. Here is what is returned: > > ava.sql.SQLException: System or internal error > at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:348) > at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2202) > at com.informix.jdbc.IfxSqli.executeClose(IfxSqli.java:1740) > at com.informix.jdbc.IfxResultSet.close(IfxResultSet.java:1589) > at > > The customer also looked at the Informix log to find this amazing error > message > -22 Invalid argument. > > My suspicions are either the JDBC driver is not designed for this type of > load ( it is free from IBM, what do I expect? ) or the database is not tuned > for that load, or perhaps there are some leaks in my app that keep certain > resources open. I am no DBA so I can't really track down the database > issues. > > I know Informix deals with this type of load factor all the time so I am not > thinking its the DB server at all. I would just like some clues to help > figure out what the problem is. Can anyone point me in a direction to help > pinpoint the problem? Perhaps anyone with horror stories using this JDBC > driver? Thanks to everyone. > > Also can someone explain something to me? If I open a cursor that may > contain a million+ rows, how does Informix handle that? What I mean is the > cursor on in my app retrieves one row at a time, but does Informix have to > load them all into memory first or what? I am fasinated by how databases do > their magic and wonder if perhaps I should take the DB server into > consideration when creating a cursor of that size ( everything IS indexed > btw ). > > Mel Haynes Jr > >