title: How to disable profiler in Symfony2 in production?
body: <p>How to disable profiler in Symfony2 in production?</p>
  
  <p>I do not mean the toolbar - I mean the profiler.</p>
  
  <p>I want to disable it in production, I use it extensively for development so the solution with removing its bundle is a no-go.</p>
  
  <p>I have tried setting <code>framework.profiler.only_exceptions</code> to true. I have tried removing the <code>framework.profiler</code> section altogether. No matter what the profiler.db is growing after <em>every</em> request and <em>every</em> response contains <code>x-debug-token</code> header. </p>
  
  <p>I have double-checked the config files (config.yml and config_prod.yml) and everything seems to be fined.</p>
  
  <p>What's more the command <code>app/console router:dump-apache --no-debug</code> always dumps the <code>_wdt</code> and <code>_profiler</code> routes, but I don't have them in my routing_prod.yml and they don't seem to be present when trying to access them from the browser (404).</p>
  
  <p>I'm running symfony 2.0 and I won't upgrade right now because of some major changes in 2.1 which would require a rewrite of many elements. It wouldn't be wise to start it just before initial deployment.</p>