1

Last week, I tried to deploy a simple symfony app on azure. I choose the plan app service B2 (2cores / 3.5Go RAM). PHP Version : 5.6.

First it took forever to complete the composer install. (I tried to go on S3, it was a little faster but not very different). So I tried to optimize the php config, opcache, realpath_cache_size...etc (xdebug already disabled). I even tried to enable wincache, but with no real improvment.

So now my app is deployed, but it is too slow to be usable. A simple php app/console (in dev mode) takes ~23secondes. It seems to recreate the cache everytime. On my local unix environnment (similar specs), it takes 6seconds when the cache is cold and 500ms when the dev cache is warm.

measure time php app/console dev mode

I think that the main problem is a filesystem issue, because to remove the dev cache folder it takes 16 seconds. On my local unix environnment, similar specs, it takes ~200ms to remove the same folder.

measure time remove dev cache folder

Like I said I tried S3 Plan with a small improvment but not enough to explain this slowness. One thing weird, it's that if I rerun the command php app/console just after it finished, the command takes 5seconds to run (much better). But If rerun it 5seconds after it finished, it takes 23seconds.

I already tried these solutions (even if the environnment is different) : https://stackoverflow.com/a/17021255/6309878

Update : I tried to set the symfony app/cache folder to the local filesystem D:\local\cache, but no improvment, it may be worst.

5
  • Wondering if anyone saw fast thing made by micro***t. Commented May 10, 2016 at 14:59
  • @abdelwahid , since the issue is a bit hard to reproduce on our side, could you please share the web app's info with us via leveraging the approach that pointed out at github.com/projectkudu/kudu/wiki/…? Looking forward to having your feedback. Commented May 12, 2016 at 3:09
  • @abdelwahid, we are trying to dig into your site. And any updates, we will reply you in this questions. Commented May 16, 2016 at 8:09
  • @WillShao-MSFT Any news about your investigation ? Because I want to choose azure as a solution, but this slowness is a no go. Commented May 18, 2016 at 14:31
  • @abdelwahid, Could you please try Prasad's solution? Any update, please let us know. Commented Jun 8, 2016 at 1:26

1 Answer 1

1

Please try below steps and let me know if it improves the performance -

1) In the wwwroot directory of your site, create a .user.ini file (if it doesn’t already exist) and add “wincache.fcenabled=0”. This will disable Wincache.

2) Go to Azure Portal and go to the Application Settings for your app. In the App Settings section, add “WEBSITES_DYNAMIC_CACHE” with a value of 1.

3) Restart the site.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.