We have a very mysterious problem with our website and I've tried all kinds of potential solutions to no avail. To preface, we launched our site March 16th after testing it on our internal servers for a month and a half. It went well for a couple days, then all of a sudden we had customers having issues logging in. The login issues have persisted since then with various customers calling and emailing saying they cannot log in. The development has been ongoing for four years from our current developer.
We are running Magento 1.4.2 on Apache 2.2 and PHP 5.4. We had several third party developers come in and take a look at the situation and various resolutions were put into place:
1) One recommended rolling back to PHP 5.3.8 since 5.4 is incompatible with Magento 1.4.2. This is something we have not done yet but I'm skeptical that this alone would allow people to log in again.
2) Our var/sessions folder had 228,000 records in it. I enabled garbage collection and now sessions are deleting normally after 24 minutes. No affect on login issue.
3) Our var/reports folder had over 100,000 records in it. I deleted them all out on April 27th and now it's back up to 23,000 files. Obviously that is concerning, but our current developers want nothing to do with resolving the errors as "our site is highly customized so errors are natural but should not affect performance."
4) Magento caching was turned off and I have now turned it back on. No affect on login issue.
5) Server memory was 6 gb and we just upped it to 8 gb today. Seems to have not affected login issue.
6) Played with php.ini memory settings trying various memory values including -1 and all settings do not work or have any affect on the issue.
So when someone cannot login the website basically sits and sits and spins around for awhile then eventually generates a 'No data found' or 'fatal error: failed to allocate memory...' error. However, I did find one temporary fix:
- When logged in as the admin and I navigate to a specific customer account that has been having login problems and click 'Reset' at the very top, that customer can log in immediately after clicking the button. This works for an undetermined amount of time, usually about 3-4 hours, before they can no longer log in and I have to click 'Reset' again.
So what I don't understand is what makes this 'Reset' button so significant and what it is doing that offers a temporary solution to this problem. I have done countless Google searches trying to find something related to the 'Reset' button but I can't find anything. Does anyone have any insight? Thanks.
As your website is highly customized, I suspect one of the customization broke something.
How is your Disk Space usage like? Servers with full disk space will also result in the inability to login but it should throw a completely different error.
Anyway Magento 1.4.x is simply too old and too many things can go wrong. It is also definitely not compatible with PHP 5.4. You should definitely have a plan in place to upgrade to newer versions.
Try enable slow logs ( http://stackoverflow.com/questions/3878700/is-there-a-way-to-have-apache-log-slow-requests ). From the stacktrace logged, developer can able to find which function takes too much time to load.