Page 1 of 1

[1.1.107] Nested blueprint books exhaust server memory

Posted: Wed May 08, 2024 8:51 pm
by cogito123
The following is a save file taken from a multiplayer session running non modded, vanilla scenario just before server has crashed. It was found that one of players created nested blueprint books that contained entire base which exhausted memory. It allocates 13GB of memory and can take several minutes to load locally. The save file itself is around 90MB. I looked at scripting side if blueprint books can be disabled, but doesn't appear so without disabling blueprints altogether. I can also imagine similar scenarios with just normal blueprints, a player could have entire inventory with copies of entire base.

What can be done to prevent this issue by a server operator? Perhaps there should be a possibility to configure a maximum size a blueprint might have.

https://www.dropbox.com/scl/fi/ll84vffh ... w0q8m&dl=0

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Wed May 08, 2024 9:51 pm
by Rseding91
I don’t see a way to avoid this provided players are allowed to make blueprints at all. Size just reduces how fast someone could do it.

You could put a password on the server but I doubt you want to do that. In any public server there will be trolls and you will have to ban them.

Maybe another developer has some ideas.

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Wed May 08, 2024 9:54 pm
by Rseding91
You could also remove players ability to copy blueprints and or blueprint books so they would have to make them one at a time. Using the /permissions system. But that is similar to passwords where you have to micro manage who can and can’t do it.

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Fri May 10, 2024 11:11 am
by flame_Sla
the problem of large size of BPs has been around for a long time
imho, the admin in the game needs the opportunity to find out the size of the BPs from each player
currently, the size of the BPs can only be found using the operating system

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Fri May 10, 2024 12:29 pm
by mmmPI
I have no idea how much weights my blueprints, i did some large books for music that i don't want to upload everytime i go on multiplayer, but those are quite a mess, my poor organisation skill may cause me to nest some books and forgot they are there. For now i "think" i have a group with those "unsafe" blueprint but when reading this thread, i thought that if there was a way to know before clicking the book, like when hovering , just to have an indication before doing the potentially harmful click that would cause a ridiculous upload, it would help me. I have no idea if it is possible. It wouldn't address malicious intent. But it may reduce the number of accidents.

I know it's my fault, i have to keep a cleaner bp library, but also i've been playing this game for long, i have many of them and i spend more time creating new ones than deleting some. I'm just giving feedback, i can't properly order other things for which i have more incentive in real life, and for me in factorio it translate into accumulation of mess in the blueprint library, whereas it doesn't show as much on my factories since it is reset every new game.

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Tue Jul 23, 2024 9:09 pm
by Rseding91
For 2.0 I added a mechanic where "large" blueprints (the definition of large defaults to 10 megabytes) will use a different input action when copying them allowing a server owner to disable that input action if wanted. That will prevent anyone from copying nested books in books depending on the limit set by the server owner. It will also log-verbose when it does perform a copy of a "large" blueprint if the permissions allow the copy.

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Tue Jul 23, 2024 9:28 pm
by cliff_build
Awesome! Thank you.

Re: [1.1.107] Nested blueprint books exhaust server memory

Posted: Tue Jul 23, 2024 10:46 pm
by mmmPI
Nice !