Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Persistent connections even after applet quits

4 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-07-31 00:05:57.0Z
Ken Verhagen Posted on 1997-07-10 03:26:20.0Z
Message-ID: <33C4565C.857CEB1D@swissbank.com>
Date: Wed, 09 Jul 1997 23:26:20 -0400
From: Ken Verhagen <verhagk@swissbank.com>
Reply-To: verhagk@swissbank.com
X-Mailer: Mozilla 4.0 [en] (WinNT; I)
MIME-Version: 1.0
Subject: Persistent connections even after applet quits
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 12
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:573
Article PK: 252324

When my applet quits abnormally, (e.g. killing the process) and has no
chance to call closeConnection(), the connection to Sybase seems to live
on.

When I do a sp_who in sybase, I find the connection and it will not
dissapear.

Is there anything that will kill the connection even when the applet is
terminated abnormally (short of bouncing sybase and my gateway)?

I am using the JDK1.02 and Sybase 11.

Ken Verhagen


David Clegg Posted on 1997-07-30 20:58:49.0Z
Message-ID: <33DFAB09.15544AE4@sybase.com>
Date: Wed, 30 Jul 1997 13:58:49 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 3.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: verhagk@swissbank.com
Subject: Re: Persistent connections even after applet quits
References: <33C4565C.857CEB1D@swissbank.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 16
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:439
Article PK: 252191


Ken Verhagen wrote:
>
> When my applet quits abnormally, (e.g. killing the process) and has no
> chance to call closeConnection(), the connection to Sybase seems to live
> on.
>
> When I do a sp_who in sybase, I find the connection and it will not
> dissapear.
>
> Is there anything that will kill the connection even when the applet is
> terminated abnormally (short of bouncing sybase and my gateway)?

If you can see the left-over connection with sp_who, you can stop
it from the SQLServer side by using 'sp_kill <spid #>'. I think
you need to be "sa" to do this.

dave


David Lance Wolf Posted on 1997-07-31 00:05:57.0Z
Message-ID: <33DFD6E5.88ACBE4B@sybase.com>
Date: Wed, 30 Jul 1997 17:05:57 -0700
From: David Lance Wolf <dwolf@sybase.com>
X-Mailer: Mozilla 4.01 [en] (Win95; U)
MIME-Version: 1.0
Subject: Re: Persistent connections even after applet quits
X-Priority: 3 (Normal)
References: <33C4565C.857CEB1D@swissbank.com> <33DFAB09.15544AE4@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 44
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:435
Article PK: 252186

Two quick extensions to chat David said.

This is a common problem for production DBA's where a socket dies, but
SQL Server doesnt acknowledge it. SQL Server relies on the underlying
OS for the network layer support. So if the OS doesnt inform SQL Server
of a lost socket, SQL Server doesnt know. If these jobs are listed as
in 'recv_sleep' they are most likely left from dead sockets. Talk to
your sysadmin about setting the TCP_KEEPALIVE in ndd /dev/tcp (In UNIX,
on NT its a reg setting). This will force the underlying OS to send
KEEPALIVE packets down the pipe and to disconnect dead sockets. If they
are in 'recv_sleep' you can just kill them with sa_role and doing <kill
spid#>

If these connections are 'sleeping' they cant be killed, because no
current CPU context is working on them, they are sitting out in shared
memory in the SQL Server (Kinda a no-mans land). You need to do a dbcc
lct_admin to wake them up, (See you SA) or just reboot the SQL Server.
This is a sign of a bigger issue.

Cheers

Dave Wolf
Sybase Professional Services

David Clegg wrote:

> Ken Verhagen wrote:
> >
> > When my applet quits abnormally, (e.g. killing the process) and has
> no
> > chance to call closeConnection(), the connection to Sybase seems to
> live
> > on.
> >
> > When I do a sp_who in sybase, I find the connection and it will not
> > dissapear.
> >
> > Is there anything that will kill the connection even when the applet
> is
> > terminated abnormally (short of bouncing sybase and my gateway)?
>
> If you can see the left-over connection with sp_who, you can stop
> it from the SQLServer side by using 'sp_kill <spid #>'. I think
> you need to be "sa" to do this.
>
> dave


Lance Andersen Posted on 1997-07-09 15:38:27.0Z
Message-ID: <33C3B073.7309@sybase.com>
Date: Wed, 09 Jul 1997 11:38:27 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
Subject: Re: Persistent connections even after applet quits
References: <33C4565C.857CEB1D@swissbank.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 26
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:571
Article PK: 252323

I would check with my OS administrator to see what the keepalive
value is set to and possibly decrease it.


-Lance

Ken Verhagen wrote:
>
> When my applet quits abnormally, (e.g. killing the process) and has no
> chance to call closeConnection(), the connection to Sybase seems to live
> on.
>
> When I do a sp_who in sybase, I find the connection and it will not
> dissapear.
>
> Is there anything that will kill the connection even when the applet is
> terminated abnormally (short of bouncing sybase and my gateway)?
>
> I am using the JDK1.02 and Sybase 11.
>
> Ken Verhagen

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================