17
votes

My problem is this: I am running Oracle 10G on windows 98 on a virtual machine using VMWare on my desktop computer. I can connect to several users (SYS, HR, OE, ... ) with SQL Developer (which is on my desktop not on the virtual machine) but if a don't run any SQL statement for a short while, say about 2 minutes, I lose my connection and get an error like connection closed or IO-fault:connection reset by peer.

Could this have anything to do with the sp_reset_connection?

When I open SQL Plus on my virtual machine itself I don't lose the connection at all, even if it has been idle for 30 minutes or longer. So now I'm thinking there could be a problem between the Virtual Machine and my desktop computer. Before this all worked fine.

I tried closing recently installed anti-malware apps without any result. Anybody has an idea what I could do to fix this problem?

Kind regards, Veek


I stumbled upon the Keep-ALive Extension and tried it as well but without succes. Standard it is set to a 2 minute interval. I've changed this value to 1 and to 60 minutes but as soon as I stop running statements for a short while I lose my connection. There must be something else. I've already installed the newest SQL Developer version but still it is the same. (I did import the settings from my earlier release maybe I have to try without importing them.) Any other suggestions perhaps?

Kind regards,

Veek

6
What is that sp_reset_connection you are talking about? It is definitely not something that is part of a standard Oracle installation.a_horse_with_no_name
Are you using NAT networking for your VM? If so, maybe changing to bridged mode will help.Colin 't Hart
@a_horse_with_no_name : the sp_reset_connection was omething I saw in some topics but I don't know myself what it is. If it isn't a part of a standard Oracle installation then I don't have to look into this some more.Veek
@Colin 't Hart: right now my VM is using the bridged mode. Maybe changing back to NAT Networking can do the trick for me. I'll try some things with this and keep you posted.Veek
@Colin 't Hart: I finally solved the problem. My Antvirus has its own firewall and that interupts the connection everytime. I left my VM running using the bridged mode. So happy this is solved.Veek

6 Answers

17
votes

This extension works for SQL Developer 4:

https://github.com/scristalli/SQL-Developer-4-keepalive

DISCLAIMER: I'm the developer of the extension. I hope the answer is not considered advertising, because this extension is open source (and the previous non-open-source extensions were accepted as an answer).

7
votes

MinChen Chai has created Keep-Alive Extension exactly for your situation: https://sites.google.com/site/keepaliveext

It will continually send TCP keep-alive packets and prevent server disconnection by inactivity timeout.

6
votes

When used with the latest SQL Developer Version 4.0.0.13:
- MinChen's extension (http://sites.google.com/site/keepaliveext) doesn't work.
- The keepconnext extension (http://sites.google.com/site/keepconnext) too doesn't work anymore.

4
votes

On SQL Developer go to Tools > Preferences > Databases > Instances Viewer. and the option traffic duration change it to the max, this worked for me.

0
votes

Go to Tools > Monitor Sessions... and select your Connection. Set the refresh value to 60 (seconds).

While monitoring, your connection will not be lost.

Oracle SQL Developer Version 4.1.3.20

-1
votes

As the suggested extensions in this thread have had issues with recent versions of SQL Developer, I tried my way and got scristalli's code to work in a new project based on his code AND the oracle example repo.

Needs a lot of work but oh well, at least I can install the new build on SQLDev v19.2 and it works as expected.

Disclaimer: I'm the owner of the linked repo, although it's MIT as the previous versions. Feel free to fork it, pullrequest-it or do as you like