php - Symfony2: Intermittent High Response Time/Slow SessionHandlerProxy::read() completion -
i'm seeing strange behavior coming symfony2 session manager component. in particular, sessionhandlerproxy::read() function slow in production environment.
symfony\component\httpfoundation\session\storage\proxy\sessionhandlerproxy::read
i'm using apache2, on amazon ec2 running ubuntu, default symfony2 session storage (not redis, or similar), though i'm wondering if should be. have newrelic installed trace transactions reports following:
the slow responses intermittent , haven't noticed marked correlation between requests/min , slow session read times. i'm stumped, ideas might try?
i ran similar on project. identified when switched redis session handling (we've switched default file system handler php, problem still occurs intermittently).
what's happening sessionhandlerproxy::read() method locked out of session , process waiting session unlock.
session locking good thing, prevents race conditions in php. happening request accessing session , not releasing immediate can. solution found via google fu skills calls $session->save() handler finished session, intern calls session_write_close() (this unlocks session next request).
i hope helps out!
symfony api documentation session:save()
here original stack overflow question (albeit 5 years ago).
Comments
Post a Comment