I've never specifically worked with Oracle, but one thing I do know
generally is that most DBMS's of my aquaintance don't like open
connections that remain inactive for a long period of time (and
overnight qualifies as a long period of time). One database I use a
lot is MySQL. If the connection remains inactive for too long, MySQL
will close that connection but remember that it had closed it due to
inactivity. When I try to run a query again using that connection that
on my end I think is open, the database returns an error because the
connection is closed, but it reopens it. Thus, the second time
everything works just fine.
I would think that you should be able to trap that kind of an error
specifically in an SQLException (says he who has never tried it). The
error "connection reset by peer" is certainly a clue, but also not
definitive since other things can cause that kind of an error too. Out
of curiousity, is that error being generated as an SQLException or an
IOException?
Hope that helps (and also hope I haven't just rehashed something you've
already thoroughly examined).
-- Rob
--On Friday, February 23, 2001 07:43:21 AM -0500 Randy Layman
<[EMAIL PROTECTED]> wrote:
>
> This seems really strange. What it sounds like to me it the JDBC
> connects one and gets a "Connection reset by peer" error. Then the
> second (anre presumably more) connections are successful. If this is
> the case I would check that your drivers and database match up (in
> other words, not using an old dirver with a new database or vice
> versa - this may not be applicable to the Oracle thin drivers, I
> don't know) and also check that you are using the correct protocol.
> It really shounds like a problem for you, your DBA, and Oracle,
> though.
>
> Randy
>
>
> -----Original Message-----
> From: Xavier Escandell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 6:34 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Broken pipe error
>
>
> Thanks for the anwser, but:
> - The servlet is not garbage collected. When I check it in the
> mornig, after all
> night of inactivity, the servlet is active.
> - Yesterday, I included a connection pooling class. Thus, the servlet
> re-starts
> the connection.But I get a "connection reset by peer" error, when
> trying first
> access. The second access works fine.
>
> Any idea?
>
> Regards,
> Xavier
>
> Randy Layman wrote:
>
>> The answer is no - Tomcat knows nothing about your socket
>> connections and therefore can't close them. A couple of things come
>> to
> mind
>> - first the Oracle drivers might be releasing the connection, check
>> their documentation about this. Also, what is the behavior if your
>> servlet is garbage collected? Could it be that your servlet is
>> being garbage
> collected
>> and therefore you are somehow half-way closing the connection?
>>
>> Randy
>>
>> -----Original Message-----
>> From: Xavier Escandell [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, February 22, 2001 8:01 AM
>> To: [EMAIL PROTECTED]
>> Subject: Broken pipe error
>>
>> Hi:
>> I get "broken pipe error" when trying to re-execute a servlet after
>> several hours of innactivity. Then I must re-start Tomcat to get all
>> running again.
>> The servlet is connected to a database using oracle thin driver,
>> these connection is still active.
>> So my question is:
>> It is possible that the socket between Tomcat and database is being
>> closed by Tomcat?
>> If the answer is yes, how can I configure these timeout.
>>
>> Regards.
>> Xavier Escandell.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, email: [EMAIL PROTECTED]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, email: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
_ _ _ _ _ _ _ _ _ _
/\_\_\_\_\ /\_\ /\_\_\_\_\_\
/\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __ /\/_/ /\/_/ PROFUNDUM VIDITUR
/\/_/_/_/_/ /\_\ /\/_/ /\/_/
/\/_/ \/_/ /\/_/_/\/_/ /\/_/ (Whatever is said in Latin
\/_/ \/_/ \/_/_/_/_/ \/_/ appears profound)
Rob Tanner
McMinnville, Oregon
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]