Advertisement:

Author Topic: Help with memory problems [was NOT memory problems after all]  (Read 4323 times)

Aficionado

  • Guest
Today i tried to add a new country and i got an empty (blank) page. Enabling the debug, i see it is a memory error. But as you will read below, it is very strange and seems like an other problem (bug ?).

I run my multi-country system with a plan allowing me up to 256 mb physical memory. See the error:

[08-May-2015 16:36:46 Europe/London] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 90 bytes) in /home/website.eu/oc-includes/osclass/classes/database/DBRecordsetClass.php on line 186

The above error means that 256 mb are not enough.

So i switch via .htaccess to 128 mb allowance for testing reasons. Here is the error:

[08-May-2015 16:41:28 Europe/London] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /home/website.eu/oc-includes/osclass/classes/database/DBRecordsetClass.php on line 186

As you see, the error is pretty much the same for 128 mb and 256 mb, and that is at least strange. I mean there is always a few bytes missing, with either 128 or 256 mb. And that can't be true. With 128mb the missing bytes should have been a lot bigger.

Or some programmer can explain to me the cause of it.

I would appreciate some help on this, since i can't go beyond 256mb for php, unless i switch to a much more expensive hosting plan (i will not for now).

Thanks
« Last Edit: May 11, 2015, 12:53:39 am by Aficionado »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Help with memory problems
« Reply #1 on: May 08, 2015, 08:09:33 pm »
Hi,

That country, are you adding it automatically, from an Osclass geodatabase? Have been your current locations added the same way? ???

Regards

Aficionado

  • Guest
Re: Help with memory problems
« Reply #2 on: May 08, 2015, 08:11:09 pm »
Hi,

That country, are you adding it automatically, from an Osclass geodatabase? Have been your current locations added the same way? ???

Regards

I try to add a new country manually. Slovenia (SI).

Some countries are entered from geo of Osclass, some manually.


teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Help with memory problems
« Reply #3 on: May 08, 2015, 08:15:53 pm »
Manually, really? So, you add Slovenia as a country, with no regions nor cities, and you have that memory error? ???

Aficionado

  • Guest
Re: Help with memory problems
« Reply #4 on: May 08, 2015, 08:23:52 pm »
Manually, really? So, you add Slovenia as a country, with no regions nor cities, and you have that memory error? ???

When you select to add a new Location (country) you are not asked if manually or from geo. So not sure what you mean.

The regions and cities are added LATER by me, because Geo of Osclass doesn't include Slovenia.

So YES, i don't get why i have this error.


teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Help with memory problems
« Reply #5 on: May 08, 2015, 08:39:44 pm »
The regions and cities are added LATER by me, because Geo of Osclass doesn't include Slovenia.

That's what I meant with "manually". Then also it's a mistery to me, how a single, small record in the DB could be eating all your RAM away... ??? Try with Slovakia (same case, no sub-locations) and see if same happens...

Aficionado

  • Guest
Re: Help with memory problems
« Reply #6 on: May 08, 2015, 09:04:31 pm »
The regions and cities are added LATER by me, because Geo of Osclass doesn't include Slovenia.

That's what I meant with "manually". Then also it's a mistery to me, how a single, small record in the DB could be eating all your RAM away... ??? Try with Slovakia (same case, no sub-locations) and see if same happens...

Slovakia. Same.


Aficionado

  • Guest
Re: Help with memory problems
« Reply #7 on: May 08, 2015, 09:08:08 pm »
I can accept 128 to be low but also with 256 ? When adding an empty country ?

And both configurations missing the same ammount of bytes ?

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Help with memory problems
« Reply #8 on: May 08, 2015, 09:28:12 pm »
A small country with geodata, like Luxembourg? ???

Aficionado

  • Guest
Re: Help with memory problems
« Reply #9 on: May 08, 2015, 09:45:25 pm »
A small country with geodata, like Luxembourg? ???

The very same.


teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Help with memory problems
« Reply #10 on: May 08, 2015, 09:55:52 pm »
Then seems you have a problem in your installation. I'd do a test on another clean installation on same server. ???

Regards

Aficionado

  • Guest
Re: Help with memory problems
« Reply #11 on: May 08, 2015, 10:02:04 pm »
Then seems you have a problem in your installation. I'd do a test on another clean installation on same server. ???

Regards

Not a single problem. It is perfect. Running the Osclass in question for 2 years now, with 22 countries.

I guess the developers of Osclass could help and shed some light.

Aficionado

  • Guest
Re: Help with memory problems
« Reply #12 on: May 08, 2015, 10:21:45 pm »
Last test.

I put


define('OSC_MEMORY_LIMIT', '128M');


in osclass config to limit (?) to 128m. Or maybe Osclass uses anyway all available memory and ignores that ?

And i set 256 mb for php in .htaccess.

Same error.


teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Help with memory problems
« Reply #13 on: May 09, 2015, 12:30:34 am »
Well, doesn't seem perfect anymore. Maybe you've reached your limits... ??? I don't have that huge amount of locations and couldn't reproduce your situation, what I know is that I've added Slovenia, Slovakia and Luxemburg with no issues on a lighter installation, hence my advice, but suit yourself...  :-X

Regards

Aficionado

  • Guest
Re: Help with memory problems
« Reply #14 on: May 09, 2015, 12:34:11 am »
Well, doesn't seem perfect anymore. Maybe you've reached your limits... ??? I don't have that huge amount of locations and couldn't reproduce your situation, what I know is that I've added Slovenia, Slovakia and Luxemburg with no issues on a lighter installation, hence my advice, but suit yourself...  :-X

Regards

With perfect i mean perfectly working, tuned and set. I'm not talking about limits. It is Cloudlinux with LiteSpeed.

Sure i have hit some limit, but what limit exactly and why ?

What are the limits anyway ... with Osclass ...

 :'(