RE: java app shuts down Informix Server
Posted in 2003
Mel, if what you're seeing looks like this:
07:00:42 Assert Failed: No Exception Handler
07:00:42 IBM Informix Dynamic Server Version 9.40.HC2
07:00:42 Who: Session(10, informix@myserver, 0, ce9ed5a0)
Thread(15, btscanner 0, ce9bd26c, 1)
File: mtex.c Line: 431
07:00:42 Results: Exception Caught. Type: MT_EX_OS, Context: mem
07:00:42 Action: Please notify IBM Informix Technical Support.
07:00:42 stack trace for pid 28311 written to /tmp/af.3f72478
07:00:42 See Also: /tmp/af.3f72478Assertion Failure Type: CRASH
Host Name: myhost
Database Server Name: myserver
Time of failure: Sun Dec 7 07:00:45 CST 2003
AF file: /tmp/af.3f72478
Shared memory file: None
System Blocking: OFF
07:00:59 mtex.c, line 431, thread 15, proc id 28311, No Exception Handler.
07:01:00 The Master Daemon Died
07:01:00 PANIC: Attempting to bring system down
07:01:00 semctl: errno = 22
07:01:00 semctl: errno = 22
07:01:00 semctl: errno = 22
07:01:01 semctl: errno = 22
07:01:01 semctl: errno = 22
It could be this bug:
Bug: 163521 ASSERT FAILED: NO EXCEPTION HANDLER WHEN RUNNING DQUERIES STRESS TEST
-----Original Message-----
From: Obnoxio The Clown [mailto:obnoxio@hotmail.com]
Sent: Thursday, December 18, 2003 1:50 PM
To: informix-list@iiug.org
Subject: Re: java app shuts down Informix Server
Mel Haynes Jr wrote:
> 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 ).
Why are you reading >1M rows? I hope it's not for updating or deleting?
Error 22 (on my Linux box, anyway) says:
"-22 Invalid argument.
An operating-system error code with the meaning shown was unexpectedly
returned to the database server. Look for other operating-system error
messages that might give more information. If the error recurs, please
refer to the Appendix entitled "Trapping Errors" in your Administrator's
Guide to acquire additional diagnostics. Contact Informix Technical Support
with the diagnostic information."
Are there any signs of any other errors in the OS logs?
Anyway, Informix will read rows into a buffer pool as needed and pass them
over to the application as needed. I'm not aware of any specific issues
with chucking lots of data through the JDBC driver, as one of my clients
does a similar thing and they've not had any specific problems like yours.
(Plenty of other ones, but none involving the JDBC driver. :o)
I wonder if you could send us the schema and the actual SQL statement you
are using. Probably the actual code fragment for the loop as well.
And also please tell me that you're not doing updates or deletes. :o)
--
"C'est pas parce qu'on n'a rien ' dire qu'il faut fermer sa gueule"
- Coluche
sending to informix-list