第一种:
Android appium服务器执行自动化脚本一个多小时总是报FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory内存溢出
通过调整\Appium\node_modules.bin\appium.cmd中的–max-old-space-size内存限制大小参数值
调整之前:
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\appium\bin\appium.js" %*
) ELSE (
node "%~dp0\..\appium\bin\appium.js" %*
)
调整之后:
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\appium\bin\appium.js" %*
) ELSE (
node --max-old-space-size=2047 --gc-global "%~dp0\..\appium\bin\appium.js" %*
)
【敲黑板知识点】:–max-old-space-size参数值设置超过