Welcome Guest, Not a member yet? Register   Sign In
[solved] Memory leak ?
#1

[eluser]vokic[/eluser]
Hi...

Having weird problem.. CI version is older, 1.5.4 i think...
We are pulling large amount of data on server. Tables are large. If the following error has to do something with that at all because we are getting error from validation class...

PHP memory limit on server is 16 MB...
We get this error:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 122880 bytes) in /var/pub/www/www.#####.###/htdocs/system/libraries/Validation.php on line 340

That particular line is: $total_errors = count($this->_error_array);

The weirdest thing is that if i do same things on my local server (which has 8MB limit) and on the same amount of data (copied the database from server) i get no error what so ever and everything is working okay..

Tried with commenting following line in DB_driver: $this->queries[] = $sql; with no success...

So the theory is that something is filling fast and overfilling and that it might not even have anything to do with database... So if anyone can help or someone had the similar problem and can share the solution, it will be greatly appreciated...

Thanks in advance...

UPDATE:

Problem solved..
Nothing to said about that except human (and by human i mean me) stupidity is endless...
Problem was lying in result set array which was supposed to be only pairs of id => some field but instead custom function was returning all records with full data...
Don't know if this has any sense to you all but for me it means the end of my headache...

Thanks...




Theme © iAndrew 2016 - Forum software by © MyBB