Reputation: 4613
I'm using git for deployment, by using a POST hook on Bitbucket that executes a PHP file, this file contains the following:
<?php
exec('cd /var/ && git reset --hard HEAD');
exec('cd /var/ && git pull origin master');
This used to work fine, but lately I noticed the deployment doesn't occur when I push to Bitbucket, and when I pointed my browser to deploy.php I get the following errors:
Warning: exec(): Unable to fork [cd /var/ && git reset --hard HEAD] in /var/www/deploy.php on line 1 array(0) { }
Warning: exec(): Unable to fork [cd /var/ && git pull origin master] in /var/www/deploy.php on line 2 array(0) { }
Not sure what went wrong. Any help will be appreciated.
I'm running on DigitalOcean Ubuntu.
Upvotes: 0
Views: 7321
Reputation: 158170
Forking in this case, means the operation to create a new process using the fork()
system call. fork()
usually fails because necessary system resources are exhausted, it is likely that memory limits or the maximum number of open processes per system is reached.
Upvotes: 3