Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 9852 invoked from network); 19 Jul 2004 15:25:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Jul 2004 15:25:55 -0000 Received: (qmail 6864 invoked by uid 500); 19 Jul 2004 15:25:37 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 6694 invoked by uid 500); 19 Jul 2004 15:25:35 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 6610 invoked by uid 99); 19 Jul 2004 15:25:34 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received: from [195.188.213.5] (HELO smtp-out2.blueyonder.co.uk) (195.188.213.5) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 19 Jul 2004 08:25:32 -0700 Received: from 500mhzdell ([82.35.52.96]) by smtp-out2.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Mon, 19 Jul 2004 16:25:42 +0100 Message-ID: <005a01c46da4$9d361d50$60342352@500mhzdell> From: "Frank Burns" To: "Log4J Users List" References: Subject: Getting JDBCAppender to use a connection pool? Date: Mon, 19 Jul 2004 16:25:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-OriginalArrivalTime: 19 Jul 2004 15:25:42.0504 (UTC) FILETIME=[A7798680:01C46DA4] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Can anyone point me in the right direction on how to configure the log4j.properties file to get the JDBCAppender to use a connection pool? Thanks, Frank. ----- Original Message ----- From: "James Stauffer" To: "'Log4J Users List'" Sent: Monday, July 19, 2004 1:05 PM Subject: RE: Strange behaviour with JDBCAppender -- long time lags before control returns to code > Can you profile the code to determine what is taking so long? > > James Stauffer > > > -----Original Message----- > From: Donald Larmee [mailto:dlarmee@alterthought.com] > Sent: Saturday, July 17, 2004 12:08 PM > To: 'Log4J Users List' > Subject: RE: Strange behaviour with JDBCAppender -- long time lags before > control returns to code > > > I would attach the JDBCAppender to an AsyncAppender. You would then log to > the AsyncAppender which would buffer the event and return control > immediately to your application.... As its name implies, the AsyncAppender > then logs the event asynchronously from the thread of control that submitted > the request. The AsyncAppender has attributes that allow you control the > various aspects of how/when it flushes its internal queue of buffered > requests. > > Hope it helps. > > -don > > -----Original Message----- > From: Frank Burns [mailto:frankburns@the-hub.demon.co.uk] > Sent: Saturday, July 17, 2004 7:45 AM > To: Log4J Users List > Subject: Re: Strange behaviour with JDBCAppender -- long time lags before > control returns to code > > Hi James, > > As you suggested, I've written some JDBC code to insert a record and it does > NOT hang. The response is very fast. > > So it seems like it's a JDBCAppender-related thing only. > > Any ideas on what might be happening here or how I can investigate further? > > ( I urgently need to solve this -- it's running on a live production system. > )-: > > Frank. > > ----- Original Message ----- > From: "James Stauffer" > To: > Sent: Thursday, July 15, 2004 9:29 PM > Subject: RE: Strange behaviour with JDBCAppender -- long time lags before > control returns to code > > > > If you write your own JDBC code to insert a record does it hang that > > long? > > > > -----Original Message----- > > From: Frank Burns [mailto:frankburns@the-hub.demon.co.uk] > > Sent: Thursday, July 15, 2004 9:54 AM > > To: log4j-user@jakarta.apache.org > > Subject: Strange behaviour with JDBCAppender -- long time lags before > > control returns to code > > > > > > Hi, > > > > Can anyone shed some light on what might be happening here? > > > > I was using the JDBCAppender that comes with log4j 1.2.8 to perform > logging > > to database tables. > > > > This worked well except if no logging events occurred for some time > > then > the > > database logging ceased. I believe this was because the connection to > > the database was timing out. > > > > In an attempt to cure this I used the JDBCAppender from Thomas Fenner > > and updated by Danko Mannhaupt -- see . > > > > This now works fine for my app running on my development linux > installation, > > where it is logging to a mySQL database located on the same machine. > > > > However, on the live linux implementation, where the database is on a > > different server, when no events occur for some time, the logging to > > the database still takes place immediately (the timestamp logged in > > the > database > > shows this) BUT it takes up to FIFTEEN MINUTES for control to return > > to > the > > code following this logging statement > > > > successfulLoginLogger.info(username.toUpperCase() + " logged > > in."); > > > > Any ideas what's happening and how to solve it? > > > > Thanks. > > > > Frank Burns. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > > For additional commands, e-mail: log4j-user-help@logging.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > For additional commands, e-mail: log4j-user-help@logging.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > For additional commands, e-mail: log4j-user-help@logging.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org