php - Why is the Symfony2 profiler throwing 404s when using the MemcachedProfilerStorage? -


i'm struggling identify cause of 404's when using symfony2 profiler. i'm using symfony 2.3 lts.

i have profiler enabled on our development environments , issue reproducible across several developer machines. our configuration profiler is:

framework:     profiler:         dsn: "memcached://localhost:11211"         enabled: true         lifetime: 86400 # keep profiles day @ 

on - not - pages seeing error follows:

**the page @ https://local.dev says:**  error occurred while loading web debug toolbar (404: not found).  want open profiler?  ok / cancel 

there 5 404 requests https://local.dev/_wdt/<token> , clicking cancel takes "token not found" page @ https://local.dev/_profiler/<token>

i've tried stepping through code , far have determined:

however, after call made, telnet request original token returns empty. key call distinct original token, not being overwritten.

this in turn triggers 404 error i'm seeing client side.

some additional potentially useful information:

  • the toolbar work on pages. it's pages within our admin interface having 404 toolbar errors.
  • we're using esi , using twig.
  • we're making calls {% render(controller("abundle:acontroller:anaction", {some:params})) %}
  • eliminating one of render methods 1 of our twig templates resolves issue.
  • reinstating render method , commenting out different 1 resolve issue. implying there many children or data (or similar).

what causing issue? how identify fix?

as aside, using fileprofiler works correctly.

thank assistance!

i have discovered solution after head banging.

it seems due fact we're using many render's within our templates, lots of profiler data being collected.

this profiler data being pushed memcached. and, because there lot of it, other data being evicted. discovered running:

echo stats | nc 127.0.0.1 11211 | grep evic 

and everytime loaded page, saw evicted_unfected , evictions climb.

the solution increase size of memcached's memory pool standard 64mb 256mb (or other size).

this done passing -m option @ runtime.


Comments