6

I'm running a laravel app on Azure. Things are moving in the right direction, composer install didn't use to work at all. Now however, the "php artisan optimize" command times out:

Running composer install makes php artisan optimize time out

However, running "php artisan optimize" separately is no problem at all:

Running only php artisan optimize is no problem

What could be the cause of this?

Edit:

Deleting the symfony-folder does not help, it is not present when I run the "Composer install"-command:

Symfony folder is not present

Increasing the timeout-limit does not help either, I increased it in both azure and in the composer.json file:

composer.json file Settings in Azure

This still gives me a timeout, after installing the symfony-components again:

Symfony installing

...

Arriving at php artisan optimize again

2000 second timeout

Rkey
  • 690
  • 2
  • 8
  • 25
  • You could try increasing the timeout see http://stackoverflow.com/questions/18917768/why-composer-install-timeouts-after-300-seconds this may not be a solution but would be interesting to see if given more time does it actually complete or is it juts totally stuck. – Mark Davidson Jan 21 '16 at 16:30
  • http://laravel.io/forum/09-15-2015-azure-webapps-laravel-5111-composer-install-fails looks like other people have encountered this before. – Mark Davidson Jan 21 '16 at 16:33
  • Yes sorry, I should have mentioned that I have already tried this. I'm getting screenshots right now, just a sec. – Rkey Jan 22 '16 at 08:23
  • Ok, currently waiting for the "Timed out after 2000 seconds"-message, it'll take some time X) – Rkey Jan 22 '16 at 08:54
  • Updated with images that shows the other fixes do not help. – Rkey Jan 22 '16 at 10:58

5 Answers5

1

As I deployed a new clean Laravel 5 application to Azure Web apps and tried to reproduce your issue, however, it worked fine on my side either I run the command php artisan optimize or composer install or composer update.

I installed the composer at the Site extensions at the KUDU console site of the application on Azure Web apps, the url should be like: https://<your_site_name>.scm.azurewebsites.net/SiteExtensions/#gallery

There are several solutions of other developers who occur the same issue with you, you can try these solutions:

Gary Liu
  • 13,758
  • 1
  • 17
  • 32
  • Ah, a poorly phrased question by me, my apologies. I have already tried both these things, I'll upload screenshots of them. Just a sec. – Rkey Jan 22 '16 at 08:23
0

@Rkey, According to my experience, I think the issue is more related to the symphony version/configuration. I suggest you can remove/edit the symphony configuration from the composer.lock file (NOTE: please backup this file if you cannot success, you also can recovery your environment). And then you can run this "composer install". enter image description here

After installed component, You can see an alert window which shows that

your session is timeout, please refresh your browser.

You can see this information because the server is in initialization process. Any concerns, please feel free to let me know.

Community
  • 1
  • 1
Will Shao - MSFT
  • 1,189
  • 7
  • 14
  • You are likely on to something, but I don't understand what you mean with "remove/edit the symphony configuration from the composer.lock file". The composer.lock file is over 3000 lines long, do you perhaps mean the composer.json file? In either case, what parts of the composer.lock/composer.json file are you talking about? – Rkey Jan 25 '16 at 15:26
  • @Rkey, I just wants to update the symphony components . Could you please try to use "composer update symfony/symfony" to update your components? And then you can use the "composer install" command. – Will Shao - MSFT Jan 26 '16 at 07:06
  • If I am in /home/site and run "composer.phar update symfony/symfony" it just gives me "process [9476] terminated! Press ENTER to start a new cmd process." =/ – Rkey Jan 26 '16 at 08:55
  • @Rkey, I will dig into this issue and reply you later. – Will Shao - MSFT Jan 27 '16 at 06:49
  • @Rkey, I have post a reply for pointing out current fact, should you have any further concerns, please feel free to let us know. – Ming Xu - MSFT Jan 30 '16 at 03:48
0

I'm also having this problem. Will upgrading the plan help?

According to this upgrading to S3 helps... I haven't tried it though... Let me know if it really works.

cabs
  • 710
  • 7
  • 14
  • @Rkey any any update on this?... I meant did you manage to get this working? I'm having the same issue. – cabs Jan 27 '16 at 07:49
  • I am quite sure they had a different issue. If just upgrading to S3 would help, increasing the max time for the timeout should also help. Timing out after 2000 seconds shouldn't happen even with really poor processing power, and since I can run optimize freely outside of the "composer install" command something else should be the problem. – Rkey Jan 27 '16 at 14:52
0

@Rkey & @cabs, per my understanding on this question, I wanna point out that Composer is not fully supported on Azure. The issue is that it’s using Taskkill command which is blocked on Azure. We are aware of this and please feel free to submit an idea or suggestion based on the experience with Azure at https://feedback.azure.com/forums/34192--general-feedback.

Ming Xu - MSFT
  • 2,116
  • 1
  • 11
  • 13
  • I'm even pretty sure I'm the one who pinpointed the problem that taskkill didn't work for Azure. I spent a couple of days with Azure support on that issue and I arrived at that conclusion and told them. However I think this might still be the answer. I think what happens is that optimize does finish, but the final step is to taskkill the installer. Since taskkill is blocked, the error message thinks we are still in optimize and says that's the operation that timed out – Rkey Feb 02 '16 at 09:48
  • Well I guess that sums it up for now then. There is no solution. – Rkey Feb 03 '16 at 09:20
0

I have been stuck in this problem as well for a week. Have tried all solutions on forum but no success. This morning finally solved after reinstall XAMPP. It was problem on my previous PHP version 5.6.19. While using new XAMPP with PHP version 5.6.28, it worked fine.