Rebooted PC Sockets

Posted on 1997-05-23
Medium Priority
Last Modified: 2013-12-23
We have a SunOS 5.5.1 box running Oracle 7.2 that PCs connect to.  The users can submit ad-hoc queries.  When they enter a bad one, i.e. one that would finish well into the 21st century, they sometimes think the PC is hung and reboot and/or power off the PC.

This query then continues to run wasting even more resources since there would not even be a way for the results to be returned.  What parameters can be set using ndd so that the kernel would detect via the keep_alive packet process on the socket and clean it up?  Aside from the idle timer and keep alive stuff, are there any other options in TCP/IP?

The Oracle stuff that can be set up seems to just ping the IP address associated with the socket.  Unless you set this value to some very small period of time, it would only be luck that the PC was not back up and happily responding to the ICMP packets.
Question by:tgast
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 1582093

i've never worked with Oracle, so don't know how effective could be setting a short interval for its ping call.

About TCP/IP in general, you usually should not play with kernel settings, since they affect any of your TCP/IP connections (even Netscape could start behaving strange).
Neither enabling KeepAlive would work, since the default timeout is about a couple of hours (unless, again, you change default kernel settings).

So it seems that you basically have two options:

1. see if setting up ping in Oracle would work;

2. if you have control on the client code, make a server program on the server box which works as a bridge between clients and Oracle server;
the server program should just pass incoming requests to the Oracle server, then send back answers to clients;
the advantage is that this program may send a few bytes to the client side, at specified intervals, and check for EPIPE or SIGPIPE in case the connection has been closed.
You need control on the client program to handle and skip these extra bytes.

If you would be happy with this, but don't know how to write the code, i could send you some sample on how to set up this 'custom_keep_alive' routine (C language).

Cheers, julio

Author Comment

ID: 1582094
I am not too much concerned with changing the kernel settings as they would just make socket cleanup of dead connections slightly more aggressive.  Going from the 2 hours or so I have seen as default on other UNIX variants to 15 minutes would help quite a bit.  I believe that with the relatively few number of socket connections to this system the additional overhead would be unnoticed.

I am really just looking for a good defintion of all the ndd paramters and exactly what they do.  Second to that, just a good definition and description of the ones to affect just this problem.

Also, the client software is embedded in PeopleSoft ...  Enough said?

Thanks for the input.  It is much appreciated.

Accepted Solution

albertp earned 600 total points
ID: 1582095
Hi, if your server accepts requests via the inetd daemon, you
can determine connection's keep alive without modify the kernet
and without that ndd.

You can user tcp_wrappers, from Wietse Venema (ftp.win.tue.nl).
You can install this soft (is easy) and then you will  control
time-outs directly from hosts.allow and hosts.deny files,
individualy for any server (telnets too) without any complication.
By default, Linux has got it installed.

Rgds, albertp

Author Comment

ID: 1582096
That would indeed be a very nice way to isolate that socket number.  I will have to see if it is an option to put this into inetd.  It may not be as bringing up and down the Oracle server is maintained by a process scheduler and this very well may be unacceptable to operations.  It is probably possible to use the wrapper stuff outside of inetd though.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question