[0.16.30] MAC OS: Too many files open when starting factorio

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

[0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

It just started to happen when trying to open factorio while I have no problem opening any other file intensive app like eclipse with lots of plugins and a project with lots of files opened.

Exact error is: "Error when opening /Applications/factorio.app/Contents/data/core/lualib/dataloader.lua for reading: Too many open files

Tried to reinstall 0.16.30 from scratch and still the same issue.

Edit 1: It works fine if I start it from the terminal with: /Applications/factorio.app/Contents/MacOS/factorio but it fails with the too many files open as written above if starting the app by running it from the finder

Loewchen
Global Moderator
Global Moderator
Posts: 8308
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Loewchen »

Post the log, see my signature.

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

0.000 2018-03-14 23:34:31; Factorio 0.16.30 (build 36039, mac, alpha)
0.000 Operating system: OS X 10.10.2
0.000 Program arguments: "/Applications/factorio.app"
0.000 Read data path: /Applications/factorio.app/Contents/data
0.000 Write data path: /Users/dpoudret/Library/Application Support/factorio [439901/475978MB]
0.000 Binaries path: /
0.005 System info: [CPU: Intel(R) Core(TM) i7-4578U CPU @ 3.00GHz, 4 cores, RAM: 16384 MB]
0.008 Display options: [FullScreen: 1] [VSync: 0] [UIScale: system (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
0.008 Available display adapters: 1
0.008 [0]: resolution 1280x800px at [0,0]
0.008 Create display on adapter 0. Size 1230x720 at position [15, 22].
0.232 Initialised OpenGL:[0] Intel Iris OpenGL Engine; driver: 2.1 INTEL-10.2.46
0.232 Dedicated video memory size 1536 MB
0.269 Graphics settings preset: high
0.269 Graphics options: [Graphics quality: low] [Video memory usage: high] [Light scale: 25%] [DXT: false] [Shader: 1]
0.269 [Parallel sprite loading: 1] [Max texture size: 0/8192] [Bmp cache: 0] [Sprite slicing: 1] [Low quality rotation: 0]
0.446 Error ModManager.cpp:676: Mod package read error. File /Users/dpoudret/Library/Application Support/factorio/mods/DrillingPumpjack for v0_15_1.2.2.zip/info.json not found
0.644 Error Util.cpp:49: Error when opening /Applications/factorio.app/Contents/data/core/lualib/dataloader.lua for reading: Too many open files
391.478 Goodbye

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

I removed drillingpumpjack that was in error in the log but same issue while trying to run factorio from finder at the same place in the same cpp

Loewchen
Global Moderator
Global Moderator
Posts: 8308
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Loewchen »

Since this does not seem to be a standard occurrence with factorio I would assume your OS settings are not default.

Post the output of

Code: Select all

launchctl limit maxfiles
please.

User avatar
HanziQ
Former Staff
Former Staff
Posts: 630
Joined: Fri Mar 27, 2015 7:07 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by HanziQ »

You can also use

Code: Select all

sudo lsof -n | cut -f1 -d' ' | uniq -c | sort | tail
to find out which processes have files open, and how many.

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

output of launchctl limit maxfiles
maxfiles 256 unlimited

I do not know what the default is supposed to be here as I never changed that one

Also note that this issue never occured before and I have been playing factorio on that laptop for a long time now without any issue until the last update

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

in reply to sudo lsof -n | cut -f1 -d' ' | uniq -c | sort | tail

There is no process running that is hitting the max amount of files per processes and the sum of the file also does not exceed by far the max amount of files open for the whole system.

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

also if you are interested I have:
sysctl kern.maxfiles
set to 28000

and sysctl kern.maxfilesperproc
set to 24000

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

Is there any chance that this will be looked at and fixed ?

User avatar
Dimava
Inserter
Inserter
Posts: 23
Joined: Mon Jan 15, 2018 11:29 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Dimava »

I remember catching this error when I tried to start the game with over 510 inactive mods
(Win10)
(The "Can't open dataloader.lua for reading: Too many open files" one)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Rseding91 »

Dimava wrote:I remember catching this error when I tried to start the game with over 510 inactive mods
(Win10)
(The "Can't open dataloader.lua for reading: Too many open files" one)
Huh, I learn something every day :) I wasn't aware the default open-file-handle limit was 512 using the C file API. At least on Windows it should now be 2048.
If you want to get ahold of me I'm almost always on Discord.

User avatar
HanziQ
Former Staff
Former Staff
Posts: 630
Joined: Fri Mar 27, 2015 7:07 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by HanziQ »

I'm getting 12544 as the default limit on macOS 10.13, so I'll try setting that on game startup and we'll see if it changes anything.

User avatar
HanziQ
Former Staff
Former Staff
Posts: 630
Joined: Fri Mar 27, 2015 7:07 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by HanziQ »

Has this been resolved with new versions of the game?

Islandir
Inserter
Inserter
Posts: 23
Joined: Thu Oct 02, 2014 3:47 am
Contact:

Re: [0.16.30] MAC OS: Too many files open when starting factorio

Post by Islandir »

I still see the issue when trying to start the came from the finder application folder. When did the change get in ?

Post Reply

Return to “Pending”