Skip to Main Content
  • Questions
  • run away process (OS level and oracle database level)

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, sheng.

Asked: June 05, 2005 - 9:36 pm UTC

Last updated: June 14, 2005 - 4:34 pm UTC

Version: 9i

Viewed 1000+ times

You Asked

Tom: Is there any way to catch the "ran away" processes from OS (Unix) and Oracle database level? Which is the good way to terminate them?

Thanks

Huang


and Tom said...

don't know what you mean by "catch" but a runaway process is one that is consuming more resources than you want. So, a runaway looks just like a "non-runaway" process would, the only difference is you want the non-runaway to continue and you want to stop the runaway.

You have tools in the database -- for example, when hosting a development box, I might setup a resource profile that limits CPU per call. Why? Because we code infinite loops "by accident", after a couple hundred thousand iterations the database kills it for me. So, you have "create profile" and "alter user" to assign a profile.

You also have the database resource manager (see the admin guide). It can be used to implement a policy for resource you usage you think "is fair" -- it has things like "no, you cannot even start this query, it will take too long" or "you have generated too much undo, you will be stopped now" or "you only get 20% of the resources on the machine right now" type of policies.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Huang, June 14, 2005 - 3:56 pm UTC

Tom:
At peak time, our database hit the “ORA-00020 maximum number of processes (string) exceeded Cause: All process state objects are in use. Action: Increase the value of the PROCESSES initialization parameter".
We are trying to figure out what is the reason: Is it really the user connection reach the limit of oracle process defined or is it a run away oracle process, leak, OS level....? I looked at the "user Calls" in statspack report and it is reaching the (max) Processes and also the buffer hit ratio get down as well as the CPU consumption problem (almost 100%). The active connection is not very high, for example, only 10 among 133 User log into database marked as "Active". Could you please address what steps we need to take to investigate the reason or fix the problem above except "create profile" or "database resource manager" mechanism?


Thanks in advance.





Tom Kyte
June 14, 2005 - 4:34 pm UTC

"at peak time"

answer two things

at peak time, how many users do you have?
and what is processes set to.