Drush giving Killed on Shared Rackspace

My last night ruined due to this.

Here is the complete story.

I have installed composer on Rackspace. Then i installed drush with composer(composer requires drush/drush:8.*).

But i was able to run drush only from ~/.composer/vendor/bin/drush/drush. But not from drupal root.

Here was the error i was getting:


 drush cr 

I have increased php memory limit from php.ini and in settings.php of drupal as well. But no luck.

At the end following solutions works.

1. Download the download drush.phar from Here.

2. Rename drush.phar to drush and make it executable with

     chmod+x drush

3. Replace ~/.composer/vendor/bin/drush with this drush file.

4. Now you should be able to run drush from drupal root. I hope it will solve the problem.