Deleting stale template stuck fatal memory error
Anything in queue.log that gives us hints? Anyway if it is just the stale template caches task... I'd just truncate the cache tables manually (n.b.: truncate, not delete):

templatecaches


You only need to truncate that one cache table, because it'll cascade can remove the other related columns in templatecacheelements and templatecachequeries as well.

Then I'd truncate the queue table as well to remove the no longer needed stale template cache queue jobs.

Learn more:


Zen and the Art of Craft CMS Log File Reading
The Craft {% cache %} Tag In-Depth