alt3 / cakebox

Framework agnostic virtual PHP Development Environment
128 stars 27 forks source link

exception is caused by a lack of memory #70

Closed dereuromark closed 6 years ago

dereuromark commented 8 years ago

With the cakebox running on a rather fast and new laptop (Ubuntu 15) I always get this after a while:

The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details

PHP Fatal error:  Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///opt/composer/composer.phar/vendor/symfony/console/Application.php:954

Is there any default we can adjust so this does not happen with composer?

bravo-kernel commented 8 years ago

I instantly recognize what you mean and the only way to solve this (for me) was adding more memory to the VM (2048 should do, I use 3078 myself), the default 1024 can cause issues. You probably know but just update the yaml file.

I am a bit reluctant to change the default value as 1024 seemed to be the value that most users could get a working cakebox with when we tested with low-end hosts.

Other speed up quick wins would be disabling some of the services (elasticsearch, mongo, etc).

dereuromark commented 8 years ago

I find 2048 a good default actually most people use already 4-8GB anyway and if it doesnt work otherwise, why not setting a better sane default value and adding some docs on how slower PCs can be made work (which should be the minority).

Otherwise: Can we document it at least quite prominently that a higher default is recommended here?

bravo-kernel commented 8 years ago

The tests were a while ago so.... PR the 2048 if you like :+1: