Solved

Rebooted PC Sockets

Posted on 1997-05-23
4
220 Views
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.
0
Comment
Question by:tgast
  • 2
4 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1582093
Hello,

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
0
 

Author Comment

by:tgast
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.
0
 

Accepted Solution

by:
albertp earned 200 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
0
 

Author Comment

by:tgast
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.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

792 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