The other day I ran into an issue while deploying new code to the Dutch Hosting Platform Antagonist. It seemed like Symlinks were not refreshed when a new release was pushed, resulting into unexpected issues like broken links to assets and PHP code not updating.
These issues were immediately resolved by changing the PHP version. So, the issues were resolved by restarting the PHP process.. Hmm..
After a whole bunch of testing and talking to customer support, there was one solution that I could implement into the deploy scripts: killing the lsphp service.
All issues were resolved after including this snippet in the deployment script after all others tasks were executed:
Simple and effective!