A previous instance of this task is running

This forum is for known unresolved issues facing us

A previous instance of this task is running

Postby Tech Support » Tue Sep 29, 2015 8:00 am

Sometimes you may see the following in the activity log:
“A previous instance of this task is running. This task instance will stop immediately. Synchronize option = No overlapping task instances. No instances wait”

This happens if a task instance has stalled and the task does not complete. This happens sometimes with FTP/SFTP tasks where connections do not get closed.
Normally, all tasks are run as threads within the engine. External processes can be safely terminated, but threads cannot be terminated safely (for Operating system safety) . Threads have to complete and exit normally. Hence we have no option to manually/automatically terminate threads if they hang. We just have to figure out the reason for stalling and fix it.

3 Options:

1) Set a Task Wait time:
Engine menu
Task wait time
Select task title
Wait time = 300 seconds or as needed
Click Save button
Here the task will be run as a thread within engine as it normally does, but if it exceeds the wait time, then the engine will consider it dead and set an exit code = 999. (it will still be alive/zombie). This should allow the next instance of the task to run.

2) Run the SFTP task as an external process:
Engine menu
External Process
Select task title
Select option to “run as external process”
Wait time = 300 seconds or as needed
Click Save button
The process (and task) will be terminated safely as an external process, if still running after 300 seconds.

3)
a) If your stalling task is an FTP task, consider switching the library i.e. use JScape (FTP-J) instead of Commons (FTP) and vice versa. Similarly, if your stalling task is an SFTP task, consider switching the library i.e. use JScape (SFTP-J) instead of Maverick (SFTP) and vice versa
b) If your stalling task is a batch file or script or external app, which is run using Command or WinCommand tasks, set the wait time in the task. The task will terminate any stalling process after the set wait time. So, if the schedule is to run every 15 minutes, set the wait time to be 14 minutes..
Tech Support
Site Admin
 
Posts: 1276
Joined: Thu May 25, 2006 11:12 am

Return to Known issues and bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron