I have a web server that is behaving strangely lately. To keep things brief, look at the following:

[root@xxxxx test]# ls -lah
-bash: fork: Cannot allocate memory
[root@xxxxx test]# free -m
             total       used       free     shared    buffers     cached
Mem:          1285        899        386          0          0          0
-/+ buffers/cache:        899        386
Swap:            0          0          0

Now, why would this happen? Any other information I should provide to get help?


You're on a Virtuozzo or OpenVZ PVS (Pseudo-Virtual Server), I see, which makes the concept of "memory" a fairly specious one, at best. Your provider has limited the amount of "overcommitted" memory you can use, which you've bumped up against. That "total memory" number you see in free, by the way, has no relation to reality in a VZ PVS -- the provider can configure VZ to show whatever number they want in there, regardless of what resources have actually been allocated to you.

You need to lodge this support request with your provider, as they're the only ones who can help you (we can't see what the configuration for your PVS is, let alone change it), and if you don't get the support you need from them, I'd highly recommend switching to a provider that can give you (a) a proper VPS that actually has the memory available that it says it does (ie. NOT a VZ-based PVS), and (b) proper support for what you've paid for.

  • Is there a way to know what is the exact number that has been allocated to me? – Ammar Jan 16 '10 at 23:00
  • Yep, ask your provider. – womble Jan 17 '10 at 1:01
  • I'm saying, how would I know if my provider is giving me wrong information about my resources. – Ammar Jan 17 '10 at 12:00
  • Your best bet is to try and use all of the resources that your provider says you have (such as allocating as much memory as they say you have), and if you can't do that then they're lying. Part of the problem is that VZ's resource allocation policies are very complex and hard to understand, so what your provider tells you and what you probably think you can do may have no relationship anyway. – womble Jan 17 '10 at 18:27

I think you are restricted with quota system. If you can ... just run quotacheck user from the shell...provided you have given the access for that specific command in vps environment.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.