Advertisement:

Author Topic: Ajax out of memory error  (Read 1113 times)

Aficionado

  • Guest
Ajax out of memory error
« on: February 07, 2016, 01:08:02 pm »
Hello.

I get a lof of this:

PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /home/oc-includes/osclass/controller/ajax.php on line 48

BUT those lines in Ajax are for Autocomplete:
Code: [Select]
case 'location': // This is the autocomplete AJAX
                    $cities = City::newInstance()->ajax(Params::getParam("term"));
                    foreach($cities as $k => $city) {
                        $cities[$k]['label'] = $city['label']." (".$city['region'].")";
                    }
                    echo json_encode($cities);
                break;

and Autocomplete is DISABLED in my site.

Any ideas on this ?

Thanks

edit: Please don't tell me to add more memory, because i won't and i can't. Also i use OsclassWizards theme with Dropdown. Nothing uses autocomplete. Osclass 3.6 and PHP 7.0.2.
« Last Edit: February 07, 2016, 01:12:48 pm by Aficionado »

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Ajax out of memory error
« Reply #1 on: February 07, 2016, 02:14:05 pm »
Could you PM the URL of your website?

Thanks

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Ajax out of memory error
« Reply #2 on: February 07, 2016, 02:15:17 pm »
Since you run 21 countries, that is huge... and this seems like the issue you experienced with OW and incomplete code few days ago.
Maybe it is triggered from admin? You need to test this and carefully watch log and mark the action that triggered it (a page or something).

Aficionado

  • Guest
Re: Ajax out of memory error
« Reply #3 on: February 07, 2016, 03:18:48 pm »
Since you run 21 countries, that is huge... and this seems like the issue you experienced with OW and incomplete code few days ago.
Maybe it is triggered from admin? You need to test this and carefully watch log and mark the action that triggered it (a page or something).

Yes apparently so, not sure if the admin is producing this error (since i admin it once  a week and the errors are daily). Also if this happens in admin, i would notice a blank screen probably ....

Still, the autocomplete is not used or at least it should not be used.

(btw: the errors with memory were there with Modern theme also a year+ back.)
« Last Edit: February 07, 2016, 03:21:09 pm by Aficionado »

Aficionado

  • Guest
Re: Ajax out of memory error
« Reply #4 on: February 08, 2016, 01:34:48 pm »
Could you PM the URL of your website?

Thanks

I did pm you, and please if you have anything to suggest ...

Thanks