Subject Re: [Firebird-Java] Periodical Server-Crashes
Author Rick Fincher
Hi Carsten,

I had a similar problem when I started using the diver with connection
pooling. In a few places my code did not explicitly close the result set
and statement of a connection. Even though this was bad form, it worked
without connection pooling because the connection was destroyed and its
staments and connections were automatically destroyed too.

With pooling, the connection isn't destroyed, but returned to the pool, so
associated statements and result sets build up in memory until all the
memory allocated to the JVM was used and it blew up. This took several days
depending on how often the offending code was called.

Some versions of InterClient and Poolman did not seem to have the problem,
others did. I don't know if that was because Poolman tried to clean up
after my sloppy code, or what, but I first saw the problem after upgrading
InterClient.

Since JayBird supports internal connection pooling you may want to use that
instead of PoolMan, it is probably more efficient.

Rick

----- Original Message -----
From: "Carsten Schäfer" <ca_schaefer@...>
To: <Firebird-Java@yahoogroups.com>
Sent: Tuesday, October 22, 2002 12:47 PM
Subject: Re: [Firebird-Java] Periodical Server-Crashes


> After testing the actual driver for 10 days the problem is even worse.
> I think there is no memory-leak anymore,
> but know our application is dying after 1-2 days.
> This has never happened before the installation of the new driver.
> Our application is running as an service (see http://www.roeschter.com/),
> and now it dies after some time with an access violation (Dr. Watson).
> (I think the JVM dies)
> Has anyone seen this before ?
> Has anyone tested the actual driver in a real world application ?
>
> gruß
> Carsten
>
>
> ----- Original Message -----
> From: "David Jencks" <davidjencks@...>
> To: <Firebird-Java@yahoogroups.com>
> Sent: Friday, October 11, 2002 7:35 PM
> Subject: Re: [Firebird-Java] Periodical Server-Crashes
>
>
> > (sent privately)
> >
> > david jencks
> >
> > On 2002.10.11 12:26:51 -0400 Carsten Schäfer wrote:
> > > Can someone please send me an actual jar.
> > > I have problems in compiling the cvs-snapshots.
> > >
> > > thanks
> > > Carsten
> > >
> > > ----- Original Message -----
> > > From: "David Jencks" <davidjencks@...>
> > > To: <Firebird-Java@yahoogroups.com>
> > > Sent: Friday, October 11, 2002 5:52 PM
> > > Subject: Re: [Firebird-Java] Periodical Server-Crashes
> > >
> > >
> > > > There was one leak of actual db connections I fixed recently, but I
> > > don't
> > > > remember for sure if it is fixed in RC1. You might try the cvs
version
> > > of
> > > > the driver. If that doesn't help I'll need more info...I don't have
any
> > > > windows version.
> > > >
> > > > thanks
> > > > david jencks
> > > >
> > > > On 2002.10.11 08:27:44 -0400 Carsten Schäfer wrote:
> > > > > Firebird and the jbird driver are on the same machine.
> > > > > If its important i could put my app (its an Appserver) with
jaybird
> > > or
> > > > > the database to a client machine, but it's not easy because it
> > > happens at
> > > > > customer that is 800 miles away.
> > > > > I'm using jre 1.3.1_04, before this I'v used 1.3.1_03 with the
same
> > > > > problem.
> > > > > I must use Java 1.3.
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "David Jencks" <davidjencks@...>
> > > > > To: <Firebird-Java@yahoogroups.com>
> > > > > Sent: Friday, October 11, 2002 1:43 PM
> > > > > Subject: Re: [Firebird-Java] Periodical Server-Crashes
> > > > >
> > > > >
> > > > > > Are firebird and the jbird driver on the same machine or
different
> > > > > > machines?
> > > > > >
> > > > > > If different, which machine experiences the problem?
> > > > > > If the same, can you run on 2 mcahines to identify which end has
> > > the
> > > > > > problem?
> > > > > >
> > > > > > What jvm are you using? Does it occur with other jvms?
> > > > > >
> > > > > > thanks
> > > > > > david jencks
> > > > > >
> > > > > >
> > > > > > On 2002.10.11 03:26:52 -0400 Carsten Schäfer wrote:
> > > > > > > Hi,
> > > > > > > i have a big problem.
> > > > > > > I have written a java-programm that connects to firebird.
> > > > > > > On one of my customers the server where my programm runs
crashes
> > > from
> > > > > > > time to time (1 time a week).
> > > > > > > Its a Windows 2000 Server with SP3 installed.
> > > > > > > I get the following in the system Event-Log:
> > > > > > > Event ID 2019
> > > > > > > Description:
> > > > > > > The server was unable to allocate from the system nonpaged
pool
> > > > > because
> > > > > > > the pool was empty.
> > > > > > >
> > > > > > > This error is decribed here:
> > > http://support.microsoft.com/default.aspx?scid=kb;en-us;Q133384
> > > > > > >
> > > > > > > When this error occurs no client can connect to the server.
> > > > > > > (the server can see the clients, but the client no longer the
> > > server)
> > > > > > >
> > > > > > > I'm using Jaybird RC1 with Firebird 1.0.
> > > > > > > The only difference between this customer and my other ones is
> > > > > jaybird.
> > > > > > > Elsewhere i'm using Interclient.
> > > > > > > But I can't use IC at this customer because of some bugs with
it.
> > > > > > > This is my largest customer. I'm using 2 connections(1 read/1
> > > write)
> > > > > to
> > > > > > > the db for every client,
> > > > > > > and i have up to 25 Clients that can work with my programm
> > > > > simultaneous.
> > > > > > > I'm only closing the 2 connections when the client disconnects
> > > from
> > > > > my
> > > > > > > programm. (Sometimes after a few days)
> > > > > > >
> > > > > > > I have used poolmon to identify the pool tag that consumes all
> > > from
> > > > > the
> > > > > > > nonpaged pool.
> > > > > > > Its called 'AfdB'
> > > > > > > Does someone know where this is used ?
> > > > > > > Is it in Jaybird ?
> > > > > > > Or is it in Firebird ?
> > > > > > >
> > > > > > > gruß
> > > > > > > Carsten Schäfer
> > > > > > >
> > > > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > > > > > > <HTML><HEAD>
> > > > > > > <META http-equiv=Content-Type content="text/html;
> > > > > charset=iso-8859-1">
> > > > > > > <META content="MSHTML 6.00.2800.1106" name=GENERATOR>
> > > > > > > <STYLE></STYLE>
> > > > > > > </HEAD>
> > > > > > > <BODY bgColor=#ffffff>
> > > > > > >
> > > > > > >
> > > > > > > <DIV>
> > > > > > > <DIV>Hi,</DIV>
> > > > > > > <DIV>i have a big problem.</DIV>
> > > > > > > <DIV>I have written a java-programm that connects to
> > > firebird.</DIV>
> > > > > > > <DIV>On one of my customers the server where my programm runs
> > > crashes
> > > > > > > from time
> > > > > > > to time (1 time a week).</DIV>
> > > > > > > <DIV>Its a Windows 2000 Server with SP3 installed.</DIV>
> > > > > > > <DIV>I get the following in the system Event-Log:</DIV>
> > > > > > > <DIV>Event ID 2019 </DIV>
> > > > > > > <DIV>Description:<BR>The server was unable to allocate from
the
> > > > > system
> > > > > > > nonpaged
> > > > > > > pool because the pool was empty. </DIV>
> > > > > > > <DIV> </DIV>
> > > > > > > <DIV>This error is decribed here: <A
> > > > > > >
href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q133384">http:
//support.microsoft.com/default.aspx?scid=kb;en-us;Q133384</A></DIV>
> > > > > > > <DIV> </DIV>
> > > > > > > <DIV>When this error occurs no client can connect to the
> > > > > server.</DIV>
> > > > > > > <DIV>(the server can see the clients, but the client no longer
> > > the
> > > > > > > server)</DIV>
> > > > > > > <DIV> </DIV>
> > > > > > > <DIV>I'm using Jaybird RC1 with Firebird 1.0.</DIV>
> > > > > > > <DIV>The only difference between this customer and my other
ones
> > > is
> > > > > > > jaybird.</DIV>
> > > > > > > <DIV>Elsewhere i'm using Interclient.</DIV>
> > > > > > > <DIV>But I can't use IC at this customer because of some bugs
> > > with
> > > > > > > it.</DIV>
> > > > > > > <DIV>This is my largest customer. I'm using 2 connections(1
> > > read/1
> > > > > > > write) to the db for every client,</DIV>
> > > > > > > <DIV>and i have up to 25 Clients that can work with my
programm
> > > > > > > simultaneous.
> > > > > > > I'm only closing the 2 connections when the client disconnects
> > > from
> > > > > my
> > > > > > > programm.
> > > > > > > (Sometimes after a few days)</DIV>
> > > > > > > <DIV> </DIV>
> > > > > > > <DIV>I have used poolmon to identify the pool tag that
consumes
> > > all
> > > > > from
> > > > > > > the
> > > > > > > nonpaged pool.</DIV>
> > > > > > > <DIV>Its called 'AfdB'</DIV>
> > > > > > > <DIV>Does someone know where this is used ?</DIV>
> > > > > > > <DIV>Is it in Jaybird ?</DIV>
> > > > > > > <DIV>Or is it in Firebird ?</DIV>
> > > > > > > <DIV> </DIV>
> > > > > > > <DIV>gruß</DIV>
> > > > > > > <DIV>Carsten Schäfer</DIV></DIV>
> > > > > > > <br>
> > > > > > >
> > > > > > > <!-- |**|begin egp html banner|**| -->
> > > > > > >
> > > > > > > <table border=0 cellspacing=0 cellpadding=2>
> > > > > > > <tr bgcolor=#FFFFCC>
> > > > > > > <td align=center><font size="-1" color=#003399><b>Yahoo!
Groups
> > > > > > > Sponsor</b></font></td>
> > > > > > > </tr>
> > > > > > > <tr bgcolor=#FFFFFF>
> > > > > > > <td align=center width=470><TABLE WIDTH=300 HEIGHT=250
border=0
> > > > > > > cellpadding=0 cellspacing=0><tr><td align=center><font
face=arial
> > > > > > > size=-2>ADVERTISEMENT</font><br>
> > > > > > > <TR>
> > > > > > > <TD>
> > > > > > > <a
href="http://rd.yahoo.com/M=212804.2460941.3878106.2225242/D=egroupweb/S=170
5006764:HM/A=810373/R=0/*http://geocities.yahoo.com/ps/info?.refer=blrecs"
> > > > > > > target=_top><IMG
SRC="http://us.a1.yimg.com/us.yimg.com/a/ya/yahoo_geocities/lrec2b_1_01.jpg"
> > > > > > > WIDTH=185 HEIGHT=250 BORDER=0></a></TR></TD>
> > > > > > > <TD>
> > > > > > > <a
href="http://rd.yahoo.com/M=212804.2460941.3878106.2225242/D=egroupweb/S=170
5006764:HM/A=810373/R=1/*http://geocities.yahoo.com/ps/info?.refer=blrecs"
> > > > > > > target=_top><IMG
SRC="http://us.a1.yimg.com/us.yimg.com/a/ya/yahoo_geocities/lrec2d_2_02.gif"
> > > > > > > WIDTH=115 HEIGHT=250 BORDER=0></TD>
> > > > > > > </TR></a>
> > > > > > > </TABLE></td>
> > > > > > > </tr>
> > > > > > > <tr><td><img alt="" width=1 height=1
> > > > > > >
src="http://us.adserver.yahoo.com/l?M=212804.2460941.3878106.2225242/D=egrou
pmail/S=:HM/A=810373/rand=338291842"></td></tr>
> > > > > > > </table>
> > > > > > >
> > > > > > > <!-- |**|end egp html banner|**| -->
> > > > > > >
> > > > > > >
> > > > > > > <br>
> > > > > > > <tt>
> > > > > > > To unsubscribe from this group, send an email to:<BR>
> > > > > > > Firebird-Java-unsubscribe@yahoogroups.com<BR>
> > > > > > > <BR>
> > > > > > > </tt>
> > > > > > > <br>
> > > > > > >
> > > > > > > <br>
> > > > > > > <tt>Your use of Yahoo! Groups is subject to the <a
> > > > > > > href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of
> > > > > > > Service</a>.</tt>
> > > > > > > </br>
> > > > > > >
> > > > > > > </BODY></HTML>
> > > > > > >
> > > > > >
> > > > > >
> > > > > > To unsubscribe from this group, send an email to:
> > > > > > Firebird-Java-unsubscribe@yahoogroups.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Your use of Yahoo! Groups is subject to
> > > > > http://docs.yahoo.com/info/terms/
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > To unsubscribe from this group, send an email to:
> > > > > Firebird-Java-unsubscribe@yahoogroups.com
> > > > >
> > > > >
> > > > >
> > > > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > To unsubscribe from this group, send an email to:
> > > > Firebird-Java-unsubscribe@yahoogroups.com
> > > >
> > > >
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > Firebird-Java-unsubscribe@yahoogroups.com
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > >
> > >
> >
> >
> > To unsubscribe from this group, send an email to:
> > Firebird-Java-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>