contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
85 stars 33 forks source link

Beta12: "Exception occured: Unable to launch a new process." on Hosteurope Webserver #182

Closed kikmedia closed 6 years ago

kikmedia commented 6 years ago

As an example, this one occurs on installation request.

Environment:

Using version ^2.0 for hofff/contao-shariff
/is/htdocs/.../contao/4.4/composer.json has been updated
Loading composer repositories with package information
Updating dependencies
Package operations: 7 installs, 0 updates, 0 removals
  - Installing zendframework/zend-eventmanager (3.2.0):     <warning>Failed to download zendframework/zend-eventmanager from dist: Unable to launch a new process.</warning>
    <warning>Now trying to download from source</warning>
  - Installing zendframework/zend-eventmanager (3.2.0): 
Installation failed, reverting /is/htdocs/.../contao/4.4/composer.json to its original content.
--------------------------------------------------------
Exception occured: Unable to launch a new process.
#0 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Composer/AbstractComposerCommandTask.php(166): Tenside\Core\Task\Composer\AbstractComposerCommandTask->executeCommand(Object(Tenside\Core\Task\Composer\WrappedCommand\RequireCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Tenside\Core\Task\TaskOutput))
#1 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Task.php(173): Tenside\Core\Task\Composer\AbstractComposerCommandTask->doPerform()
#2 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Runner.php(89): Tenside\Core\Task\Task->perform('/is/htdocs/wp12...')
#3 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core-bundle/src/Command/RunTaskCommand.php(82): Tenside\Core\Task\Runner->run('/is/htdocs/wp12...')
#4 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Command/Command.php(240): Tenside\CoreBundle\Command\RunTaskCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core-bundle/src/Command/RunTaskCommand.php(61): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Application.php(876): Tenside\CoreBundle\Command\RunTaskCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Application.php(216): Symfony\Component\Console\Application->doRunCommand(Object(Tenside\CoreBundle\Command\RunTaskCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/api/ApiApplication.php(71): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Application.php(122): Contao\ManagerApi\ApiApplication->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/api/console(83): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /is/htdocs/.../contao/4.4/web/contao-manager.phar.php(55): require('phar:///is/htdo...')
#12 {main}
Chained exception: Unable to launch a new process.
#0 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/process/Process.php(210): Symfony\Component\Process\Process->start(Array, NULL)
#1 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Util/ProcessExecutor.php(68): Symfony\Component\Process\Process->run(Array)
#2 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Util/Filesystem.php(124): Composer\Util\ProcessExecutor->execute('rm -rf '/is/htd...', NULL)
#3 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Util/Filesystem.php(36): Composer\Util\Filesystem->removeDirectory('/is/htdocs/wp12...')
#4 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Util/Filesystem.php(81): Composer\Util\Filesystem->remove('/is/htdocs/wp12...')
#5 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Downloader/VcsDownloader.php(64): Composer\Util\Filesystem->emptyDirectory('/is/htdocs/wp12...')
#6 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Downloader/DownloadManager.php(213): Composer\Downloader\VcsDownloader->download(Object(Composer\Package\CompletePackage), '/is/htdocs/wp12...')
#7 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Installer/LibraryInstaller.php(186): Composer\Downloader\DownloadManager->download(Object(Composer\Package\CompletePackage), '/is/htdocs/wp12...')
#8 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Installer/LibraryInstaller.php(90): Composer\Installer\LibraryInstaller->installCode(Object(Composer\Package\CompletePackage))
#9 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Installer/InstallationManager.php(173): Composer\Installer\LibraryInstaller->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Package\CompletePackage))
#10 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Installer/InstallationManager.php(160): Composer\Installer\InstallationManager->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\DependencyResolver\Operation\InstallOperation))
#11 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Installer.php(587): Composer\Installer\InstallationManager->execute(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\DependencyResolver\Operation\InstallOperation))
#12 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Installer.php(223): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Repository\CompositeRepository), Object(Composer\Repository\PlatformRepository), Array)
#13 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/composer/composer/src/Composer/Command/RequireCommand.php(180): Composer\Installer->run()
#14 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Command/Command.php(240): Composer\Command\RequireCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Tenside\Core\Task\TaskOutput))
#15 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Composer/AbstractComposerCommandTask.php(147): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Tenside\Core\Task\TaskOutput))
#16 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Composer/AbstractComposerCommandTask.php(166): Tenside\Core\Task\Composer\AbstractComposerCommandTask->executeCommand(Object(Tenside\Core\Task\Composer\WrappedCommand\RequireCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Tenside\Core\Task\TaskOutput))
#17 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Task.php(173): Tenside\Core\Task\Composer\AbstractComposerCommandTask->doPerform()
#18 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core/src/Task/Runner.php(89): Tenside\Core\Task\Task->perform('/is/htdocs/wp12...')
#19 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core-bundle/src/Command/RunTaskCommand.php(82): Tenside\Core\Task\Runner->run('/is/htdocs/wp12...')
#20 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Command/Command.php(240): Tenside\CoreBundle\Command\RunTaskCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/tenside/core-bundle/src/Command/RunTaskCommand.php(61): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Application.php(876): Tenside\CoreBundle\Command\RunTaskCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Application.php(216): Symfony\Component\Console\Application->doRunCommand(Object(Tenside\CoreBundle\Command\RunTaskCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/api/ApiApplication.php(71): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/vendor/symfony/console/Application.php(122): Contao\ManagerApi\ApiApplication->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 phar:///is/htdocs/.../contao/4.4/web/contao-manager.phar.php/api/console(83): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /is/htdocs/.../contao/4.4/web/contao-manager.phar.php(55): require('phar:///is/htdo...')
#28 {main}
--------------------------------------------------------

Process terminated with exit code 1
Reason: General error`
mstudio-dev commented 6 years ago

Same problem with Contao Manager 1.0.0-beta13 and PHP 7.0.26 on HE Webserver Basic

kikmedia commented 6 years ago

So, finally I am not alone. Works on none of my machines at Hosteurope.

uwe-wien commented 6 years ago

Same here with Contao Manager 1.0.0-beta13 and PHP 7.0.26 on HE WebPack 4 L. No workaround found so far.

frontendschlampe commented 6 years ago

same here

qzminski commented 6 years ago

Same here. @aschempp if you need a testing env drop me a line on Skype.

aschempp commented 6 years ago

I just analyzed the problem, and it's nothing the Contao Manager can fix right now. The message is coming from Composer, and I found this related ticket: https://github.com/composer/composer/issues/945

Apparently, the machines run out of actual memory. That means the only solution is to add more memory. And as the Composer ticket explains, that does not mean more actual memory, just adding a swap file is enough. I never understand why swap files are not available by default…

The only solution for the Manager is the Composer Cloud, but that still takes a while.

qzminski commented 6 years ago

I can confirm that adding the big enough swap file worked out just fine and this error is completely gone.

mstudio-dev commented 6 years ago

How can I comprehend your method @qzminski?

qzminski commented 6 years ago

I have achieved this on VPS and you can find multiple tutorials over the net on how to create a swap file on your server. If you are on shared hosting however, you should probably contact the hosting support instead.

kikmedia commented 6 years ago

According to a personal mail from Hosteurope, they won't configure a swap file on shared hostings (neither on 'Webpacks' nor on 'WebServers'). Furthermore, they told me that there will be new products later this year where they will provide 'a lot more RAM'. So, we have to wait for that. #sigh

mstudio-dev commented 6 years ago

Thank you @kikmedia. So let's wait.

philvdb commented 6 years ago

Same here, 1.0.0-beta16 on a Debian 9 VM with 1 GB of RAM. Increased to 2 GB and updating of just the core components (no extensions installed yet) did go through. The thing I'd like to add to the discussion is that while we may not be able to fix the memory hunger of composer quickly, the handling by the contao manager should be better. In my case, I saw nothing in the console output at all and it just seemed "stuck", I reloaded the page and only then the modal popped up with the error "unable to launch a new process". Since this seems to be a rather common occurrence right now, we might want to increase the amount of info the user gets in these cases.

Toflar commented 6 years ago

Today, we released version 1.0.0 stable. This version also ships with Composer Cloud that allows resolving of the dependencies on our servers. You can enable it in the hosting configuration. Try using it and see if that solves the issue and reopen if you still have the issue.


Wir haben heute Version 1.0.0 stable veröffentlicht. Diese Version bringt auch die Composer Cloud mit und ermöglicht die Abhängigkeitsauflösung auf unseren Servern. Sie kann bei den Hosting-Einstellungen aktiviert werden. Bitte damit erneut versuchen und Ticket wiedereröffnen, falls das Problem weiterhin besteht.