Websites in dev environment load in like 10 seconds, which is too much...is there any way to optimize it? I basically have default configuration, didn't change anything...What's wrong here?
The only thing I've tried is to comment out cache loading in app_dev.php, but it didn't work, loading time is still about 10 seconds.
I am running on localhost, nginx.
Thanks!
Use PHP 5.5+ or install some accelerator like APC.
Don't use controller for assetics (documentation).
Profile your application using Xhprof or Xdebug.
Related
My Symfony 3.4 application is running super slow on DEV environment - it is taking about 35 seconds when using Docker and 20 seconds when running with Symfony's server.
Profiler shows my controller takes too much time to compile.
Symfony Profiler
What I noticed is Symfony Profiler does not shows performance metrics when I run it using Docker - it does when I run using it's own server.
Any idea where I can look at? I already tried lots of workarounds without zero success.
Thanks
You probably run Symfony in prod mode on Docker. You need to make sure to run it in the environment dev so the profiler is active. Depending on your setup you need to use web/app_dev.php instead of web/app.php or set the environment variable APP_ENV=dev in case you have a public/index.php.
We have inherited a concrete 5 site and they're having a few issues with it, what seems to fix the issue is clearing the cache... Instead of doing this manually is it possible to set this up automatically via a cron job? Looking at the code I can see to call the clear cache function just calls flush::cache(); is it as simple to just create a .php file that runs flush::cache();.
I've also found these plugins, has anyone used them before?
https://www.concrete5.org/marketplace/addons/clear-cache/
The version they're running is: Currently Running 5.5.2.1
Have a look at the CacheVac addon job. https://www.concrete5.org/marketplace/addons/cache-vac
We have one particular site that is Symfony and uses the e-commerce bundle Sylius.
Our developers are trying to use Vagrant so we can have similar dev environments. We use Puphpet to generate the Vagrant instance and share the config file.
If we are working on the site/repo natively or on a staging server, all runs fine. Pages load in around 2-3 seconds.
When we are using Vagrant / Virtualbox, it's 30-35 seconds per page load.
So far we've tried
Allocating up to 6GB to the box
Giving up to 4 processors to the box
Turning on NFS for file sync
Turning off all other programs on computers running Vagrant / Virtualbox (chat, other browsers, etc)
None of those things made an impact on page load time.
I can provide 2 things. One is the load trace from Symfony: https://nimbus.everhelper.me/client/notes/share/708707/mvw707mckzm2wq4rlkzc
Since there is so much code to the puphpet config, I put it in a pastebin here: http://pastebin.com/7ciVA5FL
What is OS on a host machine?
My guess would be that file system is slow. Try to run an app outside of shared folder on the guest machine. If it will be fast, then you'll spot a problem at least.
NFS on *nix or mac should be fast enough, are you sure you've succeed to turn it on?
I had this pain once, and finally started to use unison instead of native vagrant's file sharing system (https://www.cis.upenn.edu/~bcpierce/unison/)
Have your tried:
http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html
or http://jeremybarthe.com/2015/02/02/speed-up-vagrant-environment-symfony2/
I think the first one is already included in Sylius, but not sure.
Also, dynamic image resize/crop may be reading/writing in the host file system and maybe there's a way to also change that (using symlinks or similar)?
vagrant-winnfsd works fine for me for getting NFS to work on Windows.
I keep getting an error with the MonologBundle for Symfony2:
Monolog\Logger::DEBUGS in /foo/vendor/symfony/monolog-bundle/Symfony/Bundle/MonologBundle/DependencyInjection/MonologExtension.php on line 119
It only happens in prod and happens only once, right after deleting the cache. After a refresh everything is back to normal.
All other answers suggest updating composer, which I have done, or deleting the bundle and monolog and reinstalling, which I have also done.
It happens both on my local machine (mac) and during deployment to my ubuntu machine using capistrano 2.x with capifony. Composer is freshly downloaded during those deploys, so composer version probably isn't the issue here.
Does anyone know how to solve this? Thanks in advance!
Most likely you have a typo in config, where you defined a log level for one of your handlers as "debugs" instead of "debug". Check your config.
I have created a local version of my Drupal website to do dev work on. But when I add new modules to the local version they do install but they do not enable correctly. For example I added the legal module, enabled it, but when I go to site configuration to edit it, the legal section does not appear. Any help please?
The problem is that not enough memory will be allocated to the service to allow for new modules which require more memory to be ran, try putting
ini_set('memory_limit', '256M');
in the sites/default/settings.php file.
This is a really old thread but thought it was worth adding the following.
I had this problem recently on a local dev install (using Acquia Dev Desktop, by the way). Turning off the Memcache module resolved my issue.