How to solve the error message when executing bat automation batch file? B A T C H R E C U R S I O N exceeds STACK limits

Ru Ru 6 Reputation points
2020-08-17T06:19:02.63+00:00

How to solve the error message when executing bat automation batch file? B A T C H R E C U R S I O N exceeds STACK limits

I wrote a series of automated scripts, but after executing them, error messages will jump.
How can I solve him?

****** B A T C H R E C U R S I O N exceeds the stack limit******
Recursion count = 339, stack usage rate = 90%
****** B A T C H Process A B○-[R T E d ******

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
339 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,552 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Sunny Qi 11,051 Reputation points Microsoft Vendor
    2020-08-18T07:51:33.467+00:00

    Hi,

    Thanks for posting on our new Q&A platform.

    Since your issue is related to script, I suggest you ask over at the dedicated forum over here:

    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    In addition, you could accept the useful reply as answer if you want to end this thread up.

    Best Regards,
    Sunny

    1 person found this answer helpful.
    0 comments No comments

  2. Rich Matheisen 46,811 Reputation points
    2020-08-17T18:43:43.417+00:00

    If it's a .bat file why have you tagged your question as if it involved PowerShell?

    Try searching for "recursive bat exceeds STACK limits" using Bing/Google/etc. and you'll find lots of other people that have encountered this problem. What the problem is in your case only you can tell since you haven't posted the contents of the batch file.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.