For me, this has happened when there is a misconfiguration on hook_user
in a custom module. Specifically, check all of your implementations of hook_user
to make sure there are no functions that lead to additional calls for hook_user
.
That is, if you have a module that calls foo_do_magic_to_user()
under hook_user
(or, some other function that hits hook_user
), and foo_do_magic_to_user()
calls user_save()
, then you have an infinite loop on your hands.
Update
If you're absolutely certain that it's not a hook_user
loop, then there could be any number of module-associated hangups. These often involve external services that are non-responsive (e.g. sending a "Goodbye" email but sendmail (or equivalent) isn' set up properly).
In your shoes, I would try:
1) Disable all non-core modules and see if the problem persists. If this still happens with only core modules, then you might have a deeper and more fundamental issue (correct version of PHP?)
2) If not #1, then re-enable contrib modules one-by-one and see which one is causing the issue. Inspecting that module's hook_user should give you a good clue as to what the root issue is. Most likely, one of the modules is calling some other service that is non-responsive.