Docker Community Forums

Share and learn in the Docker community.

Build ran out of memory

Hello, I just started with docker a couple of days ago and trying to run something that an old team member has made before. It should run okay, but I’m facing an issue when building. This is the error I get:
> => => # In file included from /usr/include/c++/7/bits/locale_conv.h:41:0, => => # from /usr/include/c++/7/locale:43, => => # from libs/locale/s => => # [output clipped, log limit 1MiB reached]
I’m not sure if this is okay and that I should keep it running or not. I tried to keep it running but I saw no progress at all, just the timer increasing. This is the command I tried:
docker build -t <name> .
Running the command in Windows 10 with CMD.

Can I increase the log limit to something else under windows? I saw something with build
--driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 here [output clipped, log limit 1MiB reached] and then exit code 7 · Issue #484 · docker/buildx · GitHub but no joy.

Hope this is enough info, if not please ask

1 Like

In Microsoft Visual Studio 2013, we introduced a mechanism to make sure when heap allocation isn’t successful, the compiler will communicate it to the linker, and the linker will free up some heap space by releasing a mapped file. We also implemented a mechanism to make sure when memory pressure increases, the compiler will increase the page size in heap allocation to help with the fragmentation issue. However, we recommended you take advantage of the x64 (64-bit) cross compiler tool set if you’re approaching 32-bit address space limits.

In Visual Studio 2013, we also introduced x64 cross tool. It includes 64-bit cross compilers/linkers to build for x86 and arm platforms. It’s also to the x86 (32-bit) cross tool set that is available in Visual Studio 2012 and earlier versions. This article contains an overview on how users use the x64 (64-bit) cross tool set. If you can’t move to Visual Studio 2013, you can use the following workarounds with Visual Studio 2012 and earlier versions:

If your application is being targeted for the x64 platform, use the x64 tool set to build your application. You can find instructions on How to: Enable a 64-Bit, x64 hosted MSVC toolset on the command line.
If you’re currently building your application on an x86 operating system, move to an x64 operating system. Which raises the available virtual address space from 2 gigabytes (GB) to 4 GB.
If you’re currently compiling on an x86 operating system and can’t move to an x64 operating system, use the /3GB startup switch. This raises the available virtual address space to 3 GB.

They seem to have changed how docker build writes to the console. It used to show all output and scroll the entire console window for output between build steps. Now, the output for each build step is limited to 5-6 lines, and the output just scrolls within those few lines. Then when a build step produces so much output, it eventually shows the [output clipped, log limit 1MiB reached] message and keeps building, but doesn’t display any further logs. It is utterly useless and now I can’t diagnose why some builds are failing because I can’t see any logs. I haven’t found any way to increase the limit or to change the docker build output to scroll the entire console like it used to, instead of limiting the log output to 5 lines. It’s horrible.