this post was submitted on 12 Jul 2024
25 points (83.8% liked)

Selfhosted

40391 readers
560 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I got an home server that is running docker for all my self hosted apps. But sometimes I accidentally trigger Earlyoom by remotely starting expensive docker builds, which kill docker.

I don't have access to my server outside of my home network, so I can't manually restart docker in those situations.

What would be the best way to restart it automatically? I don't mind doing a full system restart if needed

you are viewing a single comment's thread
view the rest of the comments
[–] just_another_person 35 points 4 months ago (2 children)

This isn't a band-aid, it's the literal fix.

Structuring the available CPU and Memory reservations for containers is LITERALLY the entire reason containers exist. Just because you're only familiar with the "dumb" way of using them doesn't mean you should be dismissive when someone offers you advice when you come here asking for it.

You're also seemingly just a dick for being lazy, because I looked, and wuddyaknow. So now you're just rude, dickish, and lazy.

Take the advice from the original responder, and then go and learn how to use the things you're asking for help with, along with some manners.

[–] [email protected] -4 points 4 months ago (1 children)
[–] [email protected] 18 points 4 months ago (2 children)

You can't expect people who are knowledgeable about this stuff to just forever accept that someone asks for advice, gets told the solution, and then ignores/belittles the person with knowledge.

This is our daily life experience. We get hired to be experts, and get told by non-experts that our solutions are not tenable every single day. Only for that solution to eventually be accepted when the user in question figures out their idea was not useful and the expert was correct.

We have to put up with it at work, we are not obliged to accept it here.

[–] [email protected] -2 points 4 months ago* (last edited 4 months ago) (3 children)

we are not obliged to accept it here.

He wasn't obligated to respond at all. He choose to be unchill. He wasn't even the person they replied to, and neither are you the person I replied to. Seems to me like you guys just wanna complain!

[–] [email protected] 6 points 4 months ago

In which way am I complaining? I am explaining why calling a valid solution a bandaid might be construed as belittling their very real knowledge of this process. And how that is a regular pattern in a lot technical fields.

And don't give me this shit about 'I'm not the person you were talking to' This is an open forum not a direct/private message.

[–] [email protected] 4 points 4 months ago (1 children)

You sound like you work in product

[–] [email protected] -2 points 4 months ago

You sound like you have zero costumer contact, thank god

[–] just_another_person -1 points 4 months ago

I was obliged to respond to let him know that he was actually provided the correct answer, and he didn't need to respond to the person who provided the correct answer like that. I don't feel it's right to sit idly by and let people who are only trying to help for free be getting snark like that. Obliged, much.

[–] RustyNova -3 points 4 months ago

There's a difference between helping people with misunderstanding a tool and belittling them for being wrong. It's just a matter of wording that separate an helpful answer from a toxic one

I could tell you "You should actually use Y instead of X. They are numerous benefits like A, B and C. The doc actually have a great example you may have missed or not understood it was for this purpose. It will help you a lot more than what you are thinking of doing." And this would be fine.

But "Just use Y. X is bad because Y is made for that. You not willing to use Y shouldn't make you do X. There's even a the first Google link on how to do it" isn't fine.

And I have not belittled them at all. I have said that it wasn't what I was looking for. A lot of times people post questions they think should solve their issue, but only to realise that they didn't fully understand the full picture and theirs problem is on a larger scale.

[–] RustyNova -5 points 4 months ago* (last edited 4 months ago) (1 children)

Alright, sorry for calling it a "bandaid fix". It wasn't just the right term for what I wanted to say. I was more referring on how it would only fix issues in cases of builds, and not on actual runtime, which can also be an issue if I am not careful. So yeah, it's the fix for the issue in the post, but this solution made me realise that this isn't the only thing I want.

But the second part is... Just chill. It's a home server. Not a high availability cluster. I can afford stupid things. Heck, I'm only asking this question because I got stupid and haven't limited the job count of a cargo build, downing my server. I don't care that my build crash. I just want to not have to manually restart it, because when I'm not here I can't do it.

As for the link that you sent, it's container limitations, not image building limitations. And I already have setup some on my most hungry container, stats shown that it blew past it, so idk what's going on there.

Edit: NVM. This is a bandaid fix. What if you forgot to put the flag? Like it's been 5 month since last time and forgot to do the same fix? Or you accidentally removed it while editing the command? I'm actually looking for a solution that fixed my problem fully, not a partial solution

[–] just_another_person 2 points 4 months ago

Then you didn't explain the issue very well, because what you're asking for was given to you exactly. Builds also have flags, and you should know that if you're complaining about advice given to you. I'm not saying that to admonish you, just giving you the info.

The next step down is that you're using Portainer, and having user-error issues somehow. So another solution is renaming these actions something with a very obvious prefix like "BUILD ACTION", but also setting memory limits.

The very last step is making sure your swap is in order. Allocate 2x your system memory to swap, and this will help alleviate OOM issues to a point, but especially during builds.

If you come back and say this is a band-aid solution, get a better machine and stop asking questions to solve the impossible in here. This is your fault this is an issue to begin with, you don't know how to run your machines (regardless of it just being a home server or whatever ), and you're just being rude.