I had a “Cannot call overloaded function” fatal error on two different applications (with just one web dyno) at heroku today:
app[web.1]: [25-Apr-2014 08:16:02 UTC] PHP Fatal error: Cannot call overloaded function for non-object
A ps:restart fixed it on both. But I have no idea what the root cause is.
Some suggest that this bug may be caused by hosting environment.
I’ve cerated ticket with heroku. Maybe they have reports from other php customers too and know more? I also asked if there is a heroku changelog so that one can see if any changes made could possibly have an effect on the apps.
As said: Never saw this problem before and the custom buildpack was not changed. It was stable for many month up to now.
Stackoverflow suggest this might be a memory usage issue.
The problem was not detected by monitoring because the pings did not fail. I’ll add a trigger on the logs for “PHP Fatal error” to catch them.
Update: Heroku said it’s very likely related to a memory leak in APC under high concurrency.
While the error happens there was an issue that may be related or the root cause for the problem: https://status.heroku.com/incidents/614. It’s now fixed and errors have not reoccurred.
Update2: Switching to official Heroku php buildpack and avoiding APCu fixed it.