[1.1.107] Nested blueprint books exhaust server memory

This subforum contains all the issues which we already resolved.
Post Reply
cogito123
Inserter
Inserter
Posts: 29
Joined: Thu Feb 28, 2019 7:05 pm
Contact:

[1.1.107] Nested blueprint books exhaust server memory

Post 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

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

Re: [1.1.107] Nested blueprint books exhaust server memory

Post 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.
If you want to get ahold of me I'm almost always on Discord.

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

Re: [1.1.107] Nested blueprint books exhaust server memory

Post 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.
If you want to get ahold of me I'm almost always on Discord.

flame_Sla
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Mar 01, 2019 12:54 pm
Contact:

Re: [1.1.107] Nested blueprint books exhaust server memory

Post 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

mmmPI
Smart Inserter
Smart Inserter
Posts: 3372
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [1.1.107] Nested blueprint books exhaust server memory

Post 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.

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

Re: [1.1.107] Nested blueprint books exhaust server memory

Post 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.
If you want to get ahold of me I'm almost always on Discord.

cliff_build
Inserter
Inserter
Posts: 20
Joined: Thu Dec 03, 2020 4:52 pm
Contact:

Re: [1.1.107] Nested blueprint books exhaust server memory

Post by cliff_build »

Awesome! Thank you.

mmmPI
Smart Inserter
Smart Inserter
Posts: 3372
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [1.1.107] Nested blueprint books exhaust server memory

Post by mmmPI »

Nice !

Post Reply

Return to “Resolved Problems and Bugs”