PHP settings are good, we have been using OSTicket for years no problem.
We do have our own mod's in it but nothing major.
Just checked we have the latest branch merged on git.
At best estimate we think it might have started around about the time we merged in
https://github.com/osTicket/osTicket/commit/3dd2ed35f3bfd2f061f46395b5a863b40c3f97a9
or
https://github.com/osTicket/osTicket/commit/4689926b2d3d25754f0ddcf8d4e181a2817f6d56
Hopefully this helps, i'll test the agent sessions = 0 and see if we have more issues, but might take me a week to say either way