0% found this document useful (0 votes)
65 views4 pages

Deadlocks Concept

The document discusses issues with dead processes in Teamcenter and how to troubleshoot the cause. It provides various reasons why dead processes may occur like application errors, firewall settings, or abnormal session termination. It also describes how to clean up dead processes and connections using utilities like clearlocks.

Uploaded by

Shantha Sheela
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views4 pages

Deadlocks Concept

The document discusses issues with dead processes in Teamcenter and how to troubleshoot the cause. It provides various reasons why dead processes may occur like application errors, firewall settings, or abnormal session termination. It also describes how to clean up dead processes and connections using utilities like clearlocks.

Uploaded by

Shantha Sheela
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

We're getting a lot of dead processes in Teamcenter.

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.

In SQL-Server Activity Monitor there are a lot of Suspended Processes.

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.

How can we find out the cause of these dead processes?

Answer:

The proliferation of dead sessions is not controlled by Teamcenter.

It is settings in Oracle and other security reasons that control dead sessions.

a) If there is an application running and connecting to the database and the


connection fails, it will cause dead processes. One likely cause for failure is
incorrect username/password.

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.

Having dead processes lying around could lead to major issues.

- 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 database view V$PROCESS will have no corresponding V$SESSION entry.

- An OS process/thread still exists for the SNIPED session - using resources


unnecessarily.

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.

For more details please read:


<http://www.oracle.com/technetwork/database/enterprise-edition/oraclenetdcd-
2179641.pdf>

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.

So a connection leak basically happens when we open a connection to the database


from our application and forget to close it, or for some reasons it doesn't get
closed. The reasons for the connection leaks and why we need to handle them are the
same as below.

Errors related to Connection leak

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.

2) SQL Server Does Not Exist Or Access Denied

3) General Network Error Another reason that I forgot to mention in my earlier


email is performance. The more dead processes/connection leaks there are, worse the
performance.

Some related articles:


<https://blogs.msdn.microsoft.com/dataaccesstechnologies/2009/10/13/connection-
leak-its-symptoms-and-troubleshooting/>
<https://technet.microsoft.com/en-us/library/aa175863(v=sql.80).aspx>
-----------------------------------------------------------------------------------
-----------------------

clearlocks is running too long. truncating POM_TIMESTAMP table manually


Answer:
There is an option to run clearlocks without tidying up POM_TIMESTAMP.
Customer can set this environment variable to any value to make sure that
clearlocks will not delete timestamps.

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.

To ensure minimal impact on production GTAC recommends inactivating the user


during non-working hours and performing the following steps.

1. Run clearlocks -assert_all_dead to free up any potential object locks.

2. Run the global_transfer utility per the documentation to reassign any


pending workflows.
3. Lastly, in the Organization application inactivate the user and choose the
option to "Change Ownership to..." to assign new ownership on the items to the
desired user.
-----------------------------------------------------------------------------------
--
TcFtsIndexer Structure Index Fails on large assembly. Command line is:
runTcFTSIndexer.bat -task=structure:sync
TCServer is failing with:

error_-1073741819 - Exception code: EXCEPTION_ACCESS_VIOLATION: Teamcenter Server


Terminating. - Teamcenter.SOA.tcserver_itk_main at
d:/workdir/tc13102_win64/src/server/tcgateway/main/tcserver_itk_main.cxx(330)

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.

Ref: Arrangement & appearance cleanup from a Tc shell:

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.

cleanup_arr_absoccdata -u=infodba p=password -g=dba -report


cleanup_arr_absoccdata -u=infodba -p=password -findDataWithInvalidQual
cleanup_arr_absoccdata -u=infodba -p=password - removeDataWithInvalidQual

cleanup_orphan_arrangements -u=infodba p=password -g=dba -searchForArrs -


reportcleanup_orphan_arrangements -u=infodba p=password -g=dba -searchForQuals -
report
cleanup_orphan_arrangements -u=infodba p=password -g=dba - destroyAll

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.

clearlocks -assert_all_dead -u=infodba -p=password -g=dba

You might also like