Error messages like "cannot allocate memory" or other similar error messages that you might see on the command line or in your logs indicate that you are hitting a resource limit for your VPS or VDS.
This can be caused by running too many applications simultaneously, having too many Apache processes started, or any number of other things that consume resources.
Usually, it is solved by upgrading your VPS or VDS or by reducing the amount of resource usage.
This could be as simple as only starting one or the other of PostGres or MySQL. Many people forget that when they select all applications to be installed without regard for actual needs, that it also means that some of those applications are server programs that take up resources unnecessarily upon startup of the VPS or VDS.
The moral of the story: Your first step to resolving a resource problem should be to uninstall all applications that you aren't using and restart your VPS or VDS. This can be done from your control panel. You can always add them again later from your control panel if you end up needing them again.
If you still have trouble, email firstname.lastname@example.org and they can tell you specifically what resource limit you are hitting. They can also tell you how to resolve the problem based on your specific circumstances.
Please, before contacting support, though, try the step mentioned above (remove all unused applications and restart your VPS or VDS). By avoiding contacting support needlessly, you'll help ensure your costs remain low.
If you know how to modify init scripts, comment out Apache modules, and shut down running processes, you could also free resources in that manner vs. uninstalling what you're not using. Unless you're absolutely sure of your abilities, it is still highly recommended that you use the "uninstall and restart" method to free resources.
If you're the adventurous type, you can see your resource settings and current usage by doing a "cat /proc/user_beancounters" from the command line.
The column labeled "limit" is the maximum usage allowed for the resource.
The column labeled "held" is the current usage.
The column labeled "maxheld" is the maximum usage that the resource has had since the last restart of the VPS or VDS (a high-water mark of sorts).
The column labeled "barrier" is the point at which the resource management system starts forcibly attempting to scale back usage of that resource by way of freeing up resource pages that might be hanging around for future use but aren't currently in use. This can cause problems with some applications, so it is best to stay below the barrier if possible.