# LWS OOM issue building (cooking) in a Xeon server

**URL:** <https://forums.unrealengine.com/t/lws-oom-issue-building-cooking-in-a-xeon-server/2272063>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, question\
**Created:** [January 11, 2025, 10:30pm UTC](https://forums.unrealengine.com/t/lws-oom-issue-building-cooking-in-a-xeon-server/2272063 "2025-01-11T22:30:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![galluman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@galluman](https://forums.unrealengine.com/u/galluman)\
**Post date:** [January 11, 2025, 10:30pm UTC](https://forums.unrealengine.com/t/lws-oom-issue-building-cooking-in-a-xeon-server/2272063/1 "2025-01-11T22:30:55Z")

</div>

Hi everyone!

I’m building a linux dedicated server for a small project using the latest dev-slim docker image unreal-engine:dev-slim-5.5.1. It builds perfectly fine on 2 computers, an i7 and an i9, in both windows11 (WSL) and linux, but when I try to build exactly the same thing on a Xeon based server (same Dockerfile, same build command, same project…) I get an OOM error initializing libwebsockets in the cooking stage.

This is the specific error I get in my Xeon server:

```auto
LogInit: Display:
LogInit: Display: Warning/Error Summary (Unique only)
LogInit: Display: -----------------------------------
LogInit: Display: LogWebSockets: Error: Failed to initialize libwebsockets
LogInit: Display: LogWebSockets: Warning: Lws(Error): OOM allocating 1073741816 fds
LogInit: Display: LogWebSockets: Warning: Lws(Error): ZERO RANDOM FD

```

My server has this specific CPU:

```auto
Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz

```

This Xeon server of course has much more memory than the computers I use to build it without any issue. Actually it has 256GB and during the build it never uses more than 4-5GBs. Docker builds are not limited at all in this server.

This is what I use to build the dedicated server with the unreal-engine:dev-slim-5.5.1 docker image:

```auto
RUN /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh \
    BuildCookRun \
    -project=/src/MYPROJECT.uproject \
    -nop4 \
    -Server \
    -NoClient \
    -ServerConfig=Shipping \
    -unrealexe=/home/ue4/UnrealEngine/Engine/Binaries/Linux/UnrealEditor-Cmd \
    -UTF8Output \
    -NoDebugInfo \
    -platform=Linux \
    -targetplatform=Linux \
    -build \
    -cook \
    -allmaps \
    -skipcookingeditorcontent \
    -unversionedcookedcontent \
    -pak \
    -distribution \
    -compressed \
    -stage \
    -package \
    -archive \
    -archivedirectory=/src/dist

```

Any idea why it builds well in i7/i9 computers and libwebsockets fails with that OOM in my Xeon based server?

Thanks so much in advance! 🙂

---

<div class="post-metadata">

**Author:** ![galluman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@galluman](https://forums.unrealengine.com/u/galluman)\
**Post date:** [January 11, 2025, 11:25pm UTC](https://forums.unrealengine.com/t/lws-oom-issue-building-cooking-in-a-xeon-server/2272063/2 "2025-01-11T23:25:42Z")

</div>

Ok, I feel now dumb I’ve been stuck with this for a couple days and I just found it a few minutes after posting here 😅

It seems that libwesockets has this issue when “nofiles” in ulimit is set to “too high” values. I just found a couple references:

- [MAX FDS · Issue #1769 · warmcat/libwebsockets · GitHub](https://github.com/warmcat/libwebsockets/issues/1769)

- [libwebsockets fails inside a container: OOM allocating 1073741816 fds · Issue #2449 · warmcat/libwebsockets · GitHub](https://github.com/warmcat/libwebsockets/issues/2449)

I just limited it in my Dockerfile so it always uses a reasonable low limit, like:

```auto
RUN ulimit -n 1024
RUN /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh \
      BuildCookRun \
      -project=/src/MYPROJECT.uproject \
      -nop4 \
      -Server \
      -NoClient \
      -ServerConfig=Shipping \
      -unrealexe=/home/ue4/UnrealEngine/Engine/Binaries/Linux/UnrealEditor-Cmd \
      -UTF8Output \
      -NoDebugInfo \
      -platform=Linux \
      -targetplatform=Linux \
      -build \
      -cook \
      -allmaps \
      -skipcookingeditorcontent \
      -unversionedcookedcontent \
      -pak \
      -distribution \
      -compressed \
      -stage \
      -package \
      -archive \
      -archivedirectory=/src/dist

```

And it builds fine everywhere including my Xeon build server.

Sorry for the noise, I hope it helps anybody else having this issue.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 10, 2025, 11:26pm UTC](https://forums.unrealengine.com/t/lws-oom-issue-building-cooking-in-a-xeon-server/2272063/3 "2025-02-10T23:26:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
