What the order for file BuildConfiguration.xml if there multi location

Hello,

I’m new with Unreal, and when I learn using C++ in Unreal I get error same like this:

The error message I get:

Determining max actions to execute in parallel (6 physical cores, 6 logical cores)
Executing up to 6 processes, one per physical core
Requested 1.5 GB memory per action, 7.49 GB available: limiting max parallel actions to 4
Using Parallel executor to run 3 action(s)
------ Building 3 action(s) started ------
[1/3] Compile [x64] ObstacleAssault.init.gen.cpp
c1xx: error C3859: Failed to create virtual memory for PCH
c1xx: note: the system returned code 1455: The paging file is too small for this operation to complete.
c1xx: note: please visit Precompiled Header (PCH) issues and recommendations - C++ Team Blog for more details
c1xx: fatal error C1076: compiler limit: internal heap limit reached
[2/3] Compile [x64] MovingPlatform.gen.cpp
[3/3] Compile [x64] MovingPlatform.cpp
Total time in Parallel executor: 0.56 seconds
Total execution time: 3.09 seconds
Build failed.

From the thread and search in internet, suggest to use (not working for me - UE5.4):

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
  <BuildConfiguration>
  </BuildConfiguration>
  <LocalExecutor>
    <MaxProcessorCount>12</MaxProcessorCount>
  </LocalExecutor>
  <ParallelExecutor>
    <MaxProcessorCount>12</MaxProcessorCount>
  </ParallelExecutor>
</Configuration>

But I find just use “MaxParallelActions” and it work.

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
  <BuildConfiguration>
    <MaxParallelActions>2</MaxParallelActions>
  </BuildConfiguration>
</Configuration>

The question is, when I try to change config it did not work and not detect if BuildConfiguration.xml file in these location:

H:\work\workspace\unreal\ObstacleAssault\Saved\UnrealBuildTool
D:\Applications\Epic Games\UE_5.4\Engine\Saved\UnrealBuildTool

But Unreal 5.4 do read and detect BuildConfiguration.xml in

<USER>/AppData/Roaming/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml

Why It not read project based BuildConfiguration.xml? Also “MaxProcessorCount” in “LocalExecutor” and “ParallelExecutor” section is not working. What I do wrong?

Documentation say (and I assume it detect and read in order to override config):

In addition to being added to the generated Unreal Engine (UE) project under the Config/UnrealBuildTool folder, Unreal Build Tool (UBT) reads settings from XML config files in the following locations on Windows:

  • Engine/Saved/UnrealBuildTool/BuildConfiguration.xml
  • <USER>/AppData/Roaming/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml
  • My Documents/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml
  • <PROJECT_DIRECTORY>/Saved/UnrealBuildTool/BuildConfiguration.xml

Thanks.

Trying to compile the UE engine from source, on an 8 core cpu with 32 GB RAM. I found that I needed a 16 GB swap file to work around the PCH header error problem. Apparently related to the number of concurrent compiler processes, each of which may be loading the PCH pre-built header separately. A larger C:\Epic\ drive (1 TB) and the extra swap file size, solve the build problem for me.