Solved

Rebooted PC Sockets

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
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…
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…

822 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