SyntaxC4-MSFT / ComposerExtension

Brings Composer Support to Azure Websites via a Site Extension
http://www.siteextensions.net
MIT License
15 stars 7 forks source link

Composer packages installation fails #1

Closed hajekj closed 9 years ago

hajekj commented 9 years ago

When deploying the example source code from GitHub, I end up getting following error (WAWS Composer site extension enabled):

Command: d:\home\SiteExtensions\ComposerExtension\Hooks\deploy.cmd
Using custom deployment setting for DEPLOYMENT_SOURCE custom value is 'web'.
Install Dependencies with Composer
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Installing dependencies
  - Installing pear-pear.php.net/mail_mime (1.8.9)
    Downloading
  - Installing pear-pear.php.net/mail_mimedecode (1.5.5)
    Downloading
  - Installing pear-pear.php.net/net_url2 (2.2.0)
    Downloading
  - Installing pear-pear.php.net/xml_util (1.3.0)
    Downloading
  - Installing pear-pear.php.net/console_getopt (1.4.0)
    Downloading
  - Installing pear-pear.php.net/structures_graph (1.1.0)
    Downloading
  - Installing pear-pear.php.net/archive_tar (1.3.16)
    Downloading
  - Installing pear-pear.php.net/pear (1.9.5)
    Downloading

  [UnexpectedValueException]                                                                                                                                                  
Fatal error: Uncaught exception 'Symfony\Component\Process\Exception\RuntimeException' with message 'Unable to kill the process' in phar://D:/home/SiteExtensions/ComposerExtension/Commands/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:803
  Failed to extract PEAR package D:\home\site\vendor/pear-pear.php.net/PEAR/PEAR-1.9.5.tgz to D:\home\site\vendor/pear-pear.php.net/PEAR. Reason: Unable to kill the process  
Stack trace:

#0 phar://D:/home/SiteExtensions/ComposerExtension/Commands/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php(177): Symfony\Component\Process\Process->stop()

#1 [internal function]: Symfony\Component\Process\Process->__destruct()

#2 {main}

  thrown in phar://D:/home/SiteExtensions/ComposerExtension/Commands/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php on line 803

  [Symfony\Component\Process\Exception\RuntimeException]  
  Unable to kill the process                              

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

Handling Basic Web Site deployment.
KuduSync.NET from: 'D:\home\site\repository\web' to: 'D:\home\site\wwwroot'
Deleting file: 'hostingstart.html'
Copying file: 'index.php'
Finished successfully.

Another useful information could be probably Ran For: 400 seconds This seems to me like composer is timing out - possibly by changing the Kudu timeout setting SCM_COMMAND_IDLE_TIMEOUT=600 (as per here), but I haven't tested this yet.

Could you look into this please?

hajekj commented 9 years ago

Update

It appears that the SCM_COMMAND_IDLE_TIMEOUT setting in .deployment file solved the issue. Maybe you could add it into the documentation or something maybe?

SyntaxC4 commented 9 years ago

Thanks for reporting and finding this issue... would you like to update the documentation so you are recognized for your contribution?

hajekj commented 9 years ago

Thank you, it is nice of you. I will try to have it added by tomorrow.

PhoneixS commented 8 years ago

I think there is a better approach. As you can read in documentation of the SCM_COMMAND_IDLE_TIMEOUT setting:

...it's allowed to run for up to 60 seconds without producing any output. ...

And the key is, without producing any output. I think that is better not to use the option --no-progress so you kill two problems, the command don't timeout and you can also see the log of what happened (that is also good).

And sorry for commenting this closed issue but I think it's something to get in mind.