Cannot start this task yet because "ServerTasks-93515"

Hello,
We currently use octopus to deploy to linux.
When a deployments fails for a reason, subsequent deploys (of other projects) to that server also usually fails. Here is the typical error message
Cannot start this task yet because “ServerTasks-93515” (has a write lock) tasks are
currently running and this task cannot be run in conjunction with any other tasks. Please
wait…
February 21st 2018 14:45:37Info
This task was canceled before it could start. The other task is still running

The only way we get around this currently is to restart the server. However that is not feasible going forward.

Hi,

Thanks for getting in touch.

Restarting the server is not a great outcome.

How are the deployments failing? It sounds like the deployment may still be running, or is hung, on that machine. Could you please provide a raw task log (https://octopus.com/docs/support/get-the-raw-output-from-a-task) of the failed deployment either by attaching it here or sending it to support@octopus.com (please include a reference to this discussion).

Thanks,
Shane

Thanks, @Shane_Gill, deployments fail for various reasons or sometimes hang for a long time. Even after canceling those failing deployments the issue still persists.
Here is an example of a failing deploy

Hi,

A raw log from the deployment would be a great help so we can see exactly what is happening.

When this happens, you could try checking the running processes on that machine. If you are using a standard SSH deployment target and running a script, you may see that Calamari.exe is still running:

ps aux | grep -i calamari

You should see something like this if it still running:

ubuntu 13763 24.5 4.8 501272 49320 ? Sl 09:15 0:00 mono /home/ubuntu/.octopus/master/Calamari/4.0.3/Calamari.exe run-script -script /home/ubuntu/.octopus/master/Work/20180226091453-4349-3/script.sh -variables /home/ubuntu/.octopus/master/Work/20180226091453-4349-3/variables.json

You can then kill the process and the other deployments should proceed.

kill -9 <pid>

If you don’t see a Calamari process running, sending a list of your running process may help diagnose the issue. You can get those with ps aux.

Cheers,
Shane