UE4 and Too many open files (24) error ulimit

Just a heads up, this one had me wondering for a minute so figured I’d post the fix here since google shows nothing for “UE4 ulimit” or “UE4 too many files open” error.

On slackware 14.1 the ulimit is set to 1024 which is to low for the lightmass to do its thing if you have even a small scene with a landscape on it. This is when the “Lighting failed to build” pops up in the editor. (without a log link)

if you look in the logs you see many errors related to Too Many Open Files.

to fix just set the soft ulimit to a higher #

On Slackware its something like:

check current soft ulimit with
$ulimit -Sn

copy the initscript to from /sbin to /etc
$cp /sbin/initscript.sample /etc/initscript

$emacs /etc/initscript
add ulimit -Sn 4096 and save it.

log out, then in again and should be ok (thou bigger scenes might even need over 4096, not sure I’m not that far with UE4 to know yet)

check it changed
$ulimit -Sn
should show 4096 instead of 1024

Maybe this will help a new user out some time if google spiders it up :slight_smile:

Had this on Ubuntu after adding a large landscape and trying to rebuild.

Solution is a bit simpler.

find your current limit (normally 1024):
ulimit -a

Increase it (4096 as an example):
ulimit -a 4096

Just wanted to make a correction to ndevox’s recommendation for the Ubuntu fix (big thanks to wheelies for sharing this info):

ulimit -n 4096