You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently our application suddenly became much slower on our production environment. Doing some quick profiling revealed that an http call to sessions.bugsnag.com was the root cause of this slowdown (the call took over 6 seconds on average).
Note: this was due to networking issues at digital ocean, not bugsnag itself.
I found this peculiar at first since we call deliverSessions in a kernel.terminate event in Symfony, which in theory means that I would have expected the call to sessions.bugsnag.com to happen after we had already delivered a response to the client.
Doing some quick reviewing of the code however, I learned that simply calling startSession already immediately triggers deliverSessions due to:
Hi @alcohol. This is something that we are aware of as an area of potential improvement. It is on our backlog to address as soon as priorities allow. We will post here as soon as we have any updates.
We currently use a Symfony EventSubscriber to automatically track sessions; see code:
Recently our application suddenly became much slower on our production environment. Doing some quick profiling revealed that an http call to sessions.bugsnag.com was the root cause of this slowdown (the call took over 6 seconds on average).
I found this peculiar at first since we call
deliverSessions
in akernel.terminate
event in Symfony, which in theory means that I would have expected the call to sessions.bugsnag.com to happen after we had already delivered a response to the client.Doing some quick reviewing of the code however, I learned that simply calling
startSession
already immediately triggersdeliverSessions
due to:startSession
callingincrementSessions
bugsnag-php/src/SessionTracker.php
Line 156 in 7fff851
This
$lastSent
variable defaulting to0
bugsnag-php/src/SessionTracker.php
Line 300 in 7fff851
Meaning this conditional is always
true
bugsnag-php/src/SessionTracker.php
Line 302 in 7fff851
Is this expected / intentional behaviour?
The text was updated successfully, but these errors were encountered: