Today two more modules of the php script stopped working one several hours after the other. This didn't seem to be connected to anything - script module was working perfectly minutes ago and then it gives empty screens or 503 errors, after few hours it doesn't start working again. Server reboot doesn't help. Rewriting the file with changes multiple times so that op code cache re-caches it didn't help. Breaking up the module into smaller separate modules worked again.
The server has been running the same version of PHP and APC perfectly for over a year, they were never upgraded. The only software being upgraded was litespeed. LSAPI was never updated (it is 1.5 - 2 years old) - could that have anything to do with it?
I am worried about this spontaneously decreasing tolerance of the errors, as if PHP has less and less memory to work with. What if the broken up modules stop working too soon, I can't keep breaking them up to infinity. Server has 8GB and 1GB is allocated to PHP, tasks are not memory intensive.