Welcome Guest, Not a member yet? Register   Sign In
Upper limit for active record?
#1

[eluser]ip[/eluser]
Hi,

I'm returning to CI after a lengthy absence, so if this is a stupid question or well known issue, please excuse me!

I've hit a problem with the number of records in a table; if there are more than 16384 rows in a table, $this->db->get('tablename') returns an empty record set.

Is this a CI, MySQL, or PHP issue?
#2

[eluser]PhilTem[/eluser]
I guess it's either a PHP/apache or MySQL issue as it seems you are running out of memory to process all these rows. Is it always 16384, i.e. for tables with both a small number of fields as well as tables with a big number of fields?
It may also be a script_execution_time-error that causes your script to be halted before it finished doing its job.

But in general I'd say it should not be a CI issue, more a issue that's on a lower level (thus PHP/MySQL or even apache)
#3

[eluser]ip[/eluser]
Ive just discovered that it's not always 16384, I added an id field and it dropped below 14000.

It can deal with the results if I specify column names, probably due to less data being retured.

might be PHP array issue?
#4

[eluser]PhilTem[/eluser]
It probably all goes down to memory limitations. Either your php.ini allows just X MB to be used by each php-script but you would need 2*X MB (however it should actually display an error message in that case).

Look into your php.ini and your apache.conf to see if there is any memory limitation. Otherwise it could also be a real physical memory limitation that your machine just doesn't have any more memory left Wink
#5

[eluser]Aken[/eluser]
I've never experienced this issue, but maybe check your PHP and Apache logs - there might be something in there that helps.
#6

[eluser]CroNiX[/eluser]
Also check your mysql settings. There are memory limits.
#7

[eluser]ip[/eluser]
Thank you all, some very useful pointers.

I've also found that the hosting service is awful, so they probably haven't set up apache, or MySQL correctly.




Theme © iAndrew 2016 - Forum software by © MyBB