How to release LOCK FILE?

Discussion created by yangliu2209 on Mar 5, 2014
Latest reply on Oct 15, 2014 by sjones
Hi all,

Recently, we published a GP Services. When running the GP Service on ArcMap, it works fine. However, when running it on Web Server. I got error like the screenshot: "esrijobfailed". We go to read the LOGS in ArcGIS Server Manager.
Sometimes, the error is "ExecuteError: ERROR 000871: Output table: Unable to delete the output".
Sometimes, the error is "ExecuteError: ERROR 999999: Error executing function. Cannot acquire a lock. Cannot acquire a lock. ERROR 010037: Output table D:\ArcGISData\ArcServerData\TxFIP\tools\ScratchWorkspace\scratch\scratch.gdb\tempUrbanStats could not be created".
Sometimes, it is "ERROR 999999: Error executing function. The table already exists. No spatial reference exists".
Sometimes, it is " ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application. Failed to execute (Delete)".

Besides, I check in the gdb folder. There are usually two lock files: _gdb.lock and tempStatsTable.lock. And they are not released after GP Services termination.
I also find that after the GP Service firstly executes, we wait several minutes and run the GP again, the GP works on Web server again though two lock files are still in gdb folder. Any thought? Thanks!