Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
navitas29157y@gitcherry They do? D: I've been setting up node and mongodb on 512mb servers for years. Only problem I've had was with npm. I even have an array of bots and Web services on my personal server and mongodb (in a docker container). Maybe I've been doing something wrong?._.
-
No it is fine but you have to manually limit them and they perform worse. Node by default wants to allocate atleast 2g ram and will crash if gc is not limited by options
-
cave8667yI also run a dotnet core application on a debian server, and I was surprised this thing is working with 512 RAM just fine, but there were countless bugs in dotnet core itself I had to fix first (like it crashes only because it detected a deprecated library, bug is still not fixed to this day and it's so old already)
-
@monkehparade the thing is I still have to run a vue website, so this makes them two node containers I don't think the server will handle them :\
-
@gitcherry actually after checking mongo took only 100MB or more, which is basically like MySQL but node is the problem here :\
-
@gitcherry so you're saying I need to configure it to run for less RAM? I took a 2GB server now, but I want to run multiple node containers, will this cause me trouble?
-
@cave ya those things can be a pain, but tbh I rarely face them, not sure if I'm not going deep like you are or I just happen to be lucky lol
-
@gitpush you can run as many as you want but node will allocate heap ram and you have to limit the overall alocated heap size with the --max-old-space-size flag. The default is 2g ram and will reash with out of memory exception sooner or later
-
@gitcherry well I faced same thing with my new server it turned out nodemon is the issue, the service was running but then running out of memory for some reason, switched the start command to use node bundle.js and now all is working flawlessly. Gonna try the setup on the old server and see
-
@gitpush i have 4 nodejs and a databse running on 1g ram with the old space flag set to 128 or 256. The problem with setting it lower is that the gc will work a little harder. However they work fine almost a year now. Without the flag ram runs out in 2 days
-
@gitcherry well it is for a personal project, I'll take your notes into consideration but for the meantime I'll use something else on the server and remove that old 512MB one, but its good to know about the flag for future work, thanks man :D
-
endor56706yCan't you set some swap space though? I find 1/2GB can be a lifesaver sometimes on tiny VMs. Not sure how that applies to Docker though.
Also, what's the point of a whole container just for OpenVPN? Seems a bit overkill, considering how lightweight it is... -
@endor openvpn container takes only 3MB from RAM not much.
As for swap I'll see how to do that with docker
That awkward moment when I was able to run three docker containers on a 512MB server:
1. DotNet core web service
2. MySQL
3. OpenVPN
BUT I cannot run:
1. NodeJs web service
2. MongoDB container
Spent two hours configuring the damn server to get hit by this T_T
rant
please no t_t
but why!