PWAIT_EXTENSIBILITY_CLEANUP_TASK Wait Type in SQL Server

PWAIT_EXTENSIBILITY_CLEANUP_TASK is recorded by a background task belonging to the extensibility framework behind SQL Server Machine Learning Services, the Launchpad-based machinery that runs external R and Python scripts. The task sleeps in 300-second stretches between cleanup passes, and every one of those five-minute naps lands in this wait.

It exists whether or not you ever run an external script, which is why it puzzles people on servers that have nothing to do with machine learning.

Is It a Problem?

No. It is a five-minute background timer, filtered as benign, and it commonly appears among the top waits on SQL Server 2019 and Azure SQL Database purely by accumulation. It carries no signal about external script performance, Launchpad health, or anything else operational.

If you actively use Machine Learning Services and have real performance questions, those live in the external script execution DMVs and resource governance settings for external pools, not in this cleanup task’s sleep schedule.

Common Causes

  • SQL Server 2019+ or Azure SQL Database running its extensibility framework’s background cleanup on schedule.
  • Long uptime stacking up 300-second waits.

What To Do

  1. Filter it out; our Get-WaitStatistics script excludes it by default.
  2. If you do not use Machine Learning Services and want less surface area, the feature can be left uninstalled or disabled; do that for security posture reasons, not because of this wait.
  3. For genuine external-script tuning, look at sys.dm_external_script_requests and external resource pool configuration.

How To See It

Rank waits with Get-WaitStatistics, where it is filtered. In raw output on modern versions it is a regular, harmless fixture.


Part of the SQL Server Wait Types Library.
Related deep dive: SOS_SCHEDULER_YIELD Wait Type.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *