1

I've seen this error elsewhere, but the general consensus seems to be "Increase the allowed memory PHP has". Ours is already at 1GB, so I'd like to figure out (if possible) what's going wrong here.

The full error is:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 523800 bytes) in /lib/Zend/Locale/Data.php on line 819

Then, in the Data file mentioned, line 819 is the citytotimezone case:

case 'citytotimezone':
    $_temp = self::_getFile($locale, '/ldml/dates/timeZoneNames/zone', 'type');
    foreach($_temp as $key => $found) {
        $temp += self::_getFile($locale, '/ldml/dates/timeZoneNames/zone[@type=\'' . $key . '\']/exemplarCity', '', $key);
    }
    break;

This intermittent error just started happening within the last week or so, but we've not made any relevant changes that should be affecting this.

How can I begin to debug this issue?

We are using PHP 5.3.10, if that's relevant.

  • Did you do the upgrade? – AreDubya Aug 16 '15 at 16:54
  • Not yet. Unfortunately, I'm not our server admin so I have to wait for him to get to it. :/ – travisw Aug 16 '15 at 16:56
  • Ah, that's always a bummer. Curious to know the result, post back after he does his thing plz. – AreDubya Aug 16 '15 at 16:57
  • did you checked the htaccess file , sometime it may have override default memory allocation – Chamal Chamikara Dec 31 '15 at 6:15
  • We upgraded to PHP 5.5.9 and still having the problem, although it appears to be much less common. Our htaccess has the memory set with php_value memory_limit 1024M – travisw Dec 31 '15 at 12:05
2

It's hard to say exactly why that chunk of code is trigging the memory error without more context - a stack trace, description of what actions are ongoing when the error occurs, etc.

But, I can definitely say that by going with a more modern version of PHP you will see decreased memory usage. You could always manually raise the 1GB, but even if you do that you will see more benefit with PHP 5.4 or 5.5. More information on PHP memory here.

What version of Magento are you using? Double check the system requirements here and be sure you meet them all.

  • The problem seems to happen at random. We're using 1.9.x, so we need to upgrade PHP to meet the requirements. – travisw Aug 14 '15 at 22:52
  • Definitely do that - it's a double improvement, meeting the Magento requirements and an immediate memory / performance improvement. I would bet that you will be well below limits after the upgrade. – AreDubya Aug 14 '15 at 22:59
  • We still have the problem, albeit intermittently. However, I believe we have tracked the culprit to be a third-party module IllApps_Shipsync. I will mark this answer as accepted, because it definitely got us going the right direction. Thanks! – travisw Jun 1 '16 at 19:25
0

You need to change your php.ini configuration.

in php.ini set following variable.

memory_limit = 1024M; or memory_limit = -1; (for infinite memory)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.