Solved

Rebooted PC Sockets

Posted on 1997-05-23
4
217 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now