First I'd check to increase these limits...
...the vzXYZ tools of openvz provide a good starting point on setting up ovz containers. When you used vzsplit to generated a config for a number of containers on a given hardware-node, you would have got a sample config with balanced limits equally to all containers. So that is fine to start from...
But in production you will encounter several situations when these limits aren't useful. Therefore they need to bee customized to fit into needs of each individual container. It's nice to monitor the user beancounters...
cat /proc/user_beancounters
uid resource held maxheld barrier limit failcnt
1220: kmemsize 18511794 31073180 273694720 277906112 22
lockedpages 0 8 2056 2056 0
privvmpages 204185 258842 605796 666375 0
shmpages 7830 8806 30845 30845 0
for increasing failcnt. If you get a failcnt on kmemsize for example you could easily increase the limits with the vzctl tool.
vzctl set 1220 --kmemsize 410542080:416859168 --save
Take a deeper look at the wiki http://wiki.openvz.org/UBC_consistency_check. Adjusting limits is not that painfull and I even found overcommitted nodes working without any probs. But be careful!
This script is helpful when setup as a cron-job http://github.com/peletiah/openvz/blob/master/check_beancounter.py