Advertisement:

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

Aficionado

  • Guest
Re: Help with memory problems
« Reply #15 on: May 09, 2015, 01:17:07 am »
I think i maybe have hit to a bug. I raised my memory to 384mb and still an error in a different function than previously:

[08-May-2015 22:16:05 Europe/London] PHP Fatal error:  Allowed memory size of 402653184 bytes exhausted (tried to allocate 5888 bytes) in /home/website.eu/oc-includes/osclass/formatting.php on line 174

How much memory to add ? What is needed and how it is calculated ?

« Last Edit: May 09, 2015, 01:33:48 am by Aficionado »

Aficionado

  • Guest
Re: Help with memory problems
« Reply #16 on: May 09, 2015, 01:22:49 am »
This is getting more and more interesting. Pumping the memory to 512 mb (i was allowed to do that for a week or so for testing), i got a blank also page but with a totally different error.

[08-May-2015 22:20:58 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/website.eu/oc-includes/osclass/classes/database/DBCommandClass.php on line 1660

I'm pretty sure something is wrong with Osclass and all those countries of mine.



SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems
« Reply #17 on: May 09, 2015, 01:52:09 am »
Did your host do any updates on your server?

Regards,
Eric

Aficionado

  • Guest
Re: Help with memory problems
« Reply #18 on: May 09, 2015, 02:02:02 am »
Did your host do any updates on your server?

Regards,
Eric

No, as i said this is a 100% perfect server. (it is a very high end multi-cpu server and the cpu usage is low).

I think i have hit some limit of Osclass or some bug. Because neither memory or timeout errors make any sense. Why timeout when adding  a new and empty Country ? I can't find a reason for it. Why more than 384 mb are needed when adding a new empty country ?

But i'm not a programmer, i hope that someone from Osclass team will help.


SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems
« Reply #19 on: May 09, 2015, 02:55:30 am »
Well, I have seen issues after a php upgrade for example but it could also happen if the server would have gotten a system update that's why I was wondering if your host possibly has updated server software / php or even mysql trying to rule out the environment with a certain amount of confidence instead of trusting a host being a 100% perfect continiously.
Everybody knows you can have a seemingly perfect running computer until a certain action and all of a sudden errors occur, you guessed it, the RAM is no longer without errors but it still lets you start the computer and do some basic things since errors only occur on memory location x00cb or something. My point, do not make too many assumptions but simply know by checking/asking and be certain.

Anyway let's assume no environment changes or faulty server memory.

1) So with regard to your errors, I assume you have a backup of your system so why not delete maybe 5 countries using Osclass Admin and see if you can enter a new empty country after that. It would logically rule out memory issue or query timeouts, my guess at this moment is that you get the same errors after deleting 5 countries and try to add 1 new empty country again.

I find it hard to believe a nr. of items is causing these errors unless Osclass is loading ALL countries, regions, etc. in memory using classobjects during the whole session and then some but I don't think this is the case. Actually, if it is setup the way I think it is the whole adding of countries/cities is a single action of adding data to the db. Now if the DB has some kind of issue causing php to 'think' that a record is not able to be added errors like timeouts and not enough memory could be a logical effect.

2) So, let's at least make sure you can also with a high amount of certainty rule out any DB issues by doing a trial on error on your DB using phpMyAdmin and see what happens if you try to add a record manually in the country table directly if you still had errors with previous suggestion (delete first then add).

When debuggin go step by step.....start with the base, the server setup/DB then continue the search towards the application.
Since it all seemed to be working just fine till the 23'rd country there's no reason to look for an application error in the first place so start by ruling out the other options first is my advise.

Regards,
Eric

Aficionado

  • Guest
Re: Help with memory problems
« Reply #20 on: May 09, 2015, 12:30:29 pm »
Removing a big country for a while (France) i'm able now to add new countries.


SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems
« Reply #21 on: May 09, 2015, 12:46:11 pm »
Mmmzzz still find it hard to believe it is related to nr. of languages but ohwell.....

So after deleting one country you were able to add a new empty one, can you add more empty countries now or do you get the error if you try to add another one?
(one big country in case of mem issues would logically be allowing more than 1 empty country being added)

Aficionado

  • Guest
Re: Help with memory problems
« Reply #22 on: May 09, 2015, 01:00:03 pm »
Mmmzzz still find it hard to believe it is related to nr. of languages but ohwell.....

So after deleting one country you were able to add a new empty one, can you add more empty countries now or do you get the error if you try to add another one?
(one big country in case of mem issues would logically be allowing more than 1 empty country being added)

I have ONE language only not many as you say, English only.

After removing France, I was able to add France back (!) and also add 10 other populated countries.

I'm lost. Not sure what is going on.




SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems
« Reply #23 on: May 09, 2015, 01:08:03 pm »
Sorry slip of the tongue, I meant countries  :o

SO, you deleted one and now you are able to add several new populated countries....correct?  (Oh and you are lost now....hehe)
But have you also added a new EMPTY country?? (as mentioned earlier which was causing error?)

Aficionado

  • Guest
Re: Help with memory problems
« Reply #24 on: May 09, 2015, 01:12:15 pm »
Sorry slip of the tongue, I meant countries  :o

SO, you deleted one and now you are able to add several new populated countries....correct?  (Oh and you are lost now....hehe)
But have you also added a new EMPTY country?? (as mentioned earlier which was causing error?)

Exactly. I will try a few thing and i will restore my backup and disable maintenance.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems
« Reply #25 on: May 09, 2015, 01:31:37 pm »
Based on current experiences my thoughts are towards the DB but just a thought still.
Do you do DB maintenance every once in a while?
Could it be that some cache mechanism was in the way which has been changed now that a country has actually been deleted?

Curious what your next step will bring up, no more issues or still issues... ::)

Aficionado

  • Guest
Re: Help with memory problems
« Reply #26 on: May 09, 2015, 01:35:23 pm »
Based on current experiences my thoughts are towards the DB but just a thought still.
Do you do DB maintenance every once in a while?
Could it be that some cache mechanism was in the way which has been changed now that a country has actually been deleted?

Curious what your next step will bring up, no more issues or still issues... ::)

I agree, it points to mysql db problems.

I have worked a LOT in the database from Osclass admin, since the Geo data from Osclass db was .... a mess in many cases.

Dupicate cities and other wrong information. Maybe that work damaged something, i dunno.

France for example was FULL of duplicates and i did (at the time) emailed Osclass team about it.



SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems
« Reply #27 on: May 09, 2015, 01:47:26 pm »
Would be nice if you're free of issues now.
There can be numerous silly 'little' issues causing errors pointing you in the wrong direction at first due to some issue elsewhere. That is why ruling out things is so damn important but also not always that easy. I have had situations where I could just rip my hairs out....which in the end turned out to be one %$%$# little stupid thing and errors driving me nuts, unexplainable, nothing much to go with....that will ruin your day or week even.....   :) Also, maybe more frustrating, you do something which seems to have fixed the issue but you still can't get your head around it.... what do you do, continue trying to figure out the cause or do you accept it happened, trust it is okay now and continue again?  ;D

Aficionado

  • Guest
Re: Help with memory problems [was NOT memory problems after all]
« Reply #28 on: May 11, 2015, 12:56:37 am »
Ok, to close this and give some information that may benefit someone in the future.

After REstoring the (same) database i have backed-up before the test, from Cpanel myphpadmin, i was able to add whatever i wanted with no errors. Also the database is HALF of what it was. And one more thing: Slugs were ADDED to Regions, and that field was blank before !

I have already added two more countries.

Not sure how to explain this, but it was a database problem and maybe an older Osclass version problem (that created some bad db entries ?). Or even damaged Geo data.


 ::)
« Last Edit: May 11, 2015, 01:08:16 am by Aficionado »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Help with memory problems [was NOT memory problems after all]
« Reply #29 on: May 11, 2015, 04:23:40 pm »
 8)