Tuesday, March 17, 2015

The OracleService service terminated unexpectedly

On Windows platform, the OS level service which has a name like “OracleService<SID>”, needs to be running for the database to work. If this service stops, database also stops. You may be in a situation where you receive complaints about database sudden crash, which requires DBA intervention to start this service and database. If you open Windows event viewer, it would show a message as follows.

The OracleService<SID> service terminated unexpectedly.  It has done this <n> time(s).  The following corrective action will be taken in <n>milliseconds:
Restart the service.

Most common reason of this error is resource contention. If you face this issue, you should start monitoring the system resources (CPU, RAM, Page file) usage. OSWatcher is a good tool to accomplish this. Once this issue happens, the monitoring tool should show you which resources consumption is the actual cause of this service crash – and you can take corrective actions.

Once I faced this error; and OSWatcher showed me that at the time of service crash, RAM/Pagefile was fully consumed, and the reason for this full RAM consumption was huge memory consumption by a service called “Oracle <SID> VSS Writer Service”. This service is part of Oracle starting 11g, and in 12c, the display name of this service is like “OracleVssWriter<SID>”. For this particular case, this is because of a bug (memory leek by this service) which will be resolved in 12.2. As a workaround, you should disable/stop this service if you are not using this service for Volume Shadow Copy, or stop this service just after you finish your shadow copy snapshot and then start it again when you next time need to create a snapshot.

I also faced this issue at a customer site where resource consumption was OK. Only one issue I found was that Oracle 10.2 was installed on Windows 2008 R2, which is an unsupported platform for Oracle 10.2. So I could just suspect that this unsupported installation might be causing this service crash. I suggested them to do a re-install on Windows 2008 which is supported for Oracle 10.2

No comments: