Stopping an infinite loop process in vagrant

700 views Asked by At

I have this faulty php code that when triggered gets stuck in an finite loop that sucks my CPU 60%. The environment is running through homestead (laravel environment for vagrant).

When this happens how can I restart the server without having to restart the entire machine?

Right now I'm doing vagrant halt then vagrant up but its super slow workflow. What's the fastest way to get up to speed without doing this?

1

There are 1 answers

0
ollieread On

The ideal way to solve this would be to fix that code that creates the infinite loop. You could kill the process on the VM once the loop has started but ideally you want to fix it, rather than work around it.