Re: server shutting down

From: "Joe Shevland" <jshevland(at)j-elite(dot)com>
To: <Dave(at)micro-automation(dot)net>, "'Jeremy'" <jferry(at)iexposure(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: server shutting down
Date: 2002-03-26 21:03:41
Message-ID: HEECIHEEJDBMCCGMGIOBMEBHCGAA.jshevland@j-elite.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I had this happen (backend responding with maximum connections reached) just the other day after stopping and starting a server process I'm developing (stopped/started many times over the day). It seemed the JDBC connections weren't getting closed when the Java process was shutdown (CTRL-C or close the console window, not clean I know).

After putting in a (JDK1.3 or greater) shutdown hook that explicitly shuts down the (poolman) connection pool, the problem goes away (looked for instances where I hadn't called close() on the connection too but it was all OK). The only reason I mention it is because I hadn't seen this before, but that could just be my dev server's lowly specs and 16 configured max connections. I guess that the client side sockets are closed, but the backend connections don't realise it? Or maybe its just the timing and they take a little while to realise the client has closed the socket (?).

Joe

> Jeremy,
>
> One place to start is to look in the postgres server logs and find out
> why it is shutting down.
> Also why would the backend stop giving connections? Are you not closing
> connections?
>
> Dave
>
> > -----Original Message-----
> > From: pgsql-jdbc-owner(at)postgresql(dot)org
> > [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Jeremy
> > Sent: Monday, March 25, 2002 11:41 PM
> > To: pgsql-jdbc(at)postgresql(dot)org
> > Subject: [JDBC] server shutting down
> >
> >
> > I've been having a problem for a while and I don't really
> > have any leads to
> > investigate. I've got an Enhydra java web application connected to a
> > PostgreSQL database (this happened with version 7.1.3 as well
> > as 7.2). After
> > a time of running, usually no more than a week, the database
> > stops accepting
> > new connections and responds with a message that it's
> > shutting down. I've
> > checked sys logs, database logs, and application logs but
> > there is no trace
> > of an error. In the mean time the application continues to
> > run, I presume
> > because the application's database manager maintains the original
> > connections. When I have to restart the application, the
> > connections are
> > released and the database dies. Does this sound familiar to anyone?
> > --
> > Jeremy

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Liam Stewart 2002-03-26 21:20:09 little error messages fix
Previous Message Art Taylor 2002-03-26 17:54:20 Customized Type Mapping