OpenVZ Forum


Home » General » Support » How to prevent total unavailability due Unable to fork
How to prevent total unavailability due Unable to fork [message #51204] Fri, 07 March 2014 22:09 Go to next message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
Cannot allocate memory: Unable to fork..

I mean some VM has high memory usage and it get totally locked so admin cant do commands in it, user cant login SSH, but websites working....

How can vps node admin can prevent this to happen allowing user to know what is happening with his VPS, or how to ensure user is able to use SSH?

Im not sure why this Unable to fork message appears. I thought it should be that load decrease and VPS becomes accessible, but it appears that this message is definite and VM must be manually restarted which makes customers unhappy. DOes XEN have same issues with inaccessibility and need restart?
Re: How to prevent total unavailability due Unable to fork [message #51209 is a reply to message #51204] Sun, 09 March 2014 11:59 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Unable to fork means that your VM's resources are exhausted and the programs within are experiencing fatal errors because of it.

The reason why this doesn't rectify itself after the resource usage has lowered is that the programs have actually already crashed beacuse they couldn't operate normally. When this happens to crucial parts of the OS, the only solution is a restart.

I mean, even of some websites appear to work, it doesn't mean they are working properly. Your apache might be serving some of the pages, while the database back-end could already be in a broken state. Any number of serious errors might happen, even such that corrupt the user's data permanently.

What you should do is monitor the beancounters actively and warn users as soon as you spot first failures. If the user constantly experience such problems, tell them to upgrade to a bigger VM as a precaution.

If they don't want to upgrade, tell them it's their responsibility and they should live with the consequences. It's as simple as that, really.
Re: How to prevent total unavailability due Unable to fork [message #51212 is a reply to message #51209] Sun, 09 March 2014 20:38 Go to previous messageGo to next message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
thanks for usefull explanation, why actually it crash, you speak about failures which can lead into data damage.

Let me please know why in case of example shared hosting no one need to worry about memory, they just hit the barrier and nnothing happens and in case of openvz one must be scared of ram limit.. i dont understand why damage happens, it appears to me like a bug..
Re: How to prevent total unavailability due Unable to fork [message #51220 is a reply to message #51212] Tue, 11 March 2014 15:51 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
postcd wrote on Sun, 09 March 2014 22:38

Let me please know why in case of example shared hosting no one need to worry about memory, they just hit the barrier and nnothing happens and in case of openvz one must be scared of ram limit.. i dont understand why damage happens, it appears to me like a bug..


in shared hosting server admins worries about resources usage and in case client tries to run heavy applications or sites with high load than they just offer for client to move to dedicated server or virtual server nowadays. If client doesn't agree with such offer, than contract is just terminated.

with virtual servers, provider is responsible to create a reasonable resource limitations for some price. there comes some issues. looking to spam messages in this forum from you, personaly I don't understand what service provider you are and even who can use your service. you don't understand how things works, how linux works, and you requesting spoon feeding very much.
So, if virtual server provider don't understand what limitations to set, how this affects applications, than what we can talk about?
speaking about damaging data- what do you think will happen with data in database if half of data was written to file, and than suddenly application is terminated. think about it like pulling power cable from dedicated server.
Re: How to prevent total unavailability due Unable to fork [message #51221 is a reply to message #51204] Tue, 11 March 2014 16:42 Go to previous messageGo to next message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
So it is technically impossible to prevent data loss on OpenVZ?
I did not listen that there was ever an data loss on shared hosting because of unsufficient memory, so on OpenVZ data loss can happen anytime if memory usage reach 100%? i never thought this system is so bad..
Re: How to prevent total unavailability due Unable to fork [message #51224 is a reply to message #51204] Wed, 12 March 2014 01:44 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
I would advise you to learn more about linux and system administration in general, as promptly as you can.

This forum is not the best place for it. Some perseverance, howto's on the Internet, forums with a wider audience (a Fedora or a CentOS forum, perhaps?) and possibly some good books, that's mostly what it takes.

Linux Foundation is giving a course (regular price is $2400) for free: edx.org, LFS101x. It's not advanced, but will certainly give you a sound foundation upon which to build further.

If you do continue to learn hands-on, well... you don't have anyone else to blame for *anything* that happens to your customers, but yourself. As long as you understand this... well, good luck.
Re: How to prevent total unavailability due Unable to fork [message #51226 is a reply to message #51221] Wed, 12 March 2014 07:05 Go to previous message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
postcd wrote on Tue, 11 March 2014 18:42
So it is technically impossible to prevent data loss on OpenVZ?
I did not listen that there was ever an data loss on shared hosting because of unsufficient memory, so on OpenVZ data loss can happen anytime if memory usage reach 100%? i never thought this system is so bad..


openvz doesn't have any problems about this.
btw there is not only memory usage Wink
Previous Topic: How to use tc to limit traffic?
Next Topic: Strange Centos 5 container behaviour on Centos 6 node
Goto Forum:
  


Current Time: Thu May 02 09:33:14 GMT 2024

Total time taken to generate the page: 0.01815 seconds