Deadlocks Concept
Deadlocks Concept
The only thing we've changed the last time is to cleanup the workflow-auditlogs
with the utility audit_purge.exe -logtype=Fnd0WorkflowAudit -
sublogtype=process_audit -purge -retentionperiod=xxxx
But i think this is not the reason, because we've stopped the purging and getting
e.g. 20 new dead processes in 30 minutes.
Yesterday we had a complete system downtime for 2 hours because of such many dead
processes.
Trying to delete the dead processes with clearlocks utility was not possible and we
stopped after a long time running.
After killing all these sessions on SQL Server and Reboot all our servers
teamcenter was already fine.
Now we don't know the reason of this huge amount of dead processes generated every
day.
Answer:
It is settings in Oracle and other security reasons that control dead sessions.
b) Another reason that dead connections can be created is when the application is
not used for a significant amount of time, the firewall setting between the
database and application server will close
the physical connections and invalidate the connections in the connection pool.
c) A 3rd reason is that there are previously valid connections with the database
but the connections between the client and server process has terminated
abnormally. Examples of this kind of dead connection:
- A user reboots/turns off their machine without logging off or disconnecting from
the database.
- A network problem prevents communication between the client and the server. So
with Teamcenter dead process locks can occur for any of the above reasons. But they
typically occur when a Teamcenter session terminates abnormally. Process locks are
set on an object when it is beng modified or deleted. If a Teamcenter session does
not terminate gracefully (by logging off), these locks could remain in place.
- The database exhausts PROCESSES and gives the ORA-20 maximum number of processes
exceeded error for new connections.
- The OS can become exhausted due to the unneeded resources consumed by such
processes
The solution to the above scenario is to clean up the OS dead processes after which
the V$PROCESS entries will be removed automatically. Dead Connection Detection
(DCD) is a feature of SQL.
DCD detects when there has been an unexpected connection termination and flags the
dead session.
Dead process locks (locks held by dead sessions) can cause diverse problems that
are often difficult to diagnose, and Teamcenter applications make every effort to
eliminate or otherwise avoid them.
Nevertheless, there are occasions when such dead process locks must be explicitly
removed from the database, and the clearlocks utility is used for this purpose.
If you use SQL the concept is the same, however the terminology is a somewhat
different.
So for SQL servers you will hear the term connection leak which basically refers to
a dead process.
1) Timeout expired. The timeout period elapsed prior to obtaining a connection from
the pool. This may have occurred because all pooled connections were in use and max
pool size was reached.
Set TC_TIMESTAMP_TIDY_UTIL=1
-----------------------------------------------------------------------------------
-
Need to inactivate a user and change ownership on items to new user. The old
user has over 40,000 items.
Answer:
The syslog for this case showed problems with absolute occurrences and other
objects. After running the referenced utilities the customer was able to
successfully index his large assembly.
Note: Run the -report option first to see if any data shows up. If any object show
up in the report run the applicable cleanup arguments.
You can also check to see if the db has duplicate APN data :
apn_medic -u=infodba -p=password -g=dba -all -item= -output=c:\temp\
apn_med_report_.txt
apn_medic -u=infodba -p=password -g=dba -all -item= -repair
Lastly, for good measure it's a good idea to run clearlocks with the -
assert_all_dead argument during non-working hours, which will address any locks in
the db as they can also adversely affect the indexing of objects.