Virtual private servers (VPS) run with a limited amount of memory, depending on the plan you chose. Some programs require more memory than others to operate. Some servers like Apache and Mysql can be optimized to use less memory.
If you start getting out of memory errors, we recommend to optimize the programs you use to reduce the memory consumption. You can also look into stopping any programs in memory that you don't use.
If none of these measures work, please consider upgrading your VPS to a plan with more available memory so your programs can run appropiately and without problems.