Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes)
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes)
Dear all, this error probably means I'm trying to load too much data right?
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /var/www/asc/php/Database/Driver/Mysql/Result.php on line 58
Call StackTime Memory Function Location
1 0.0001 235608 {main}( ) ../table.bezoekverslagen.php:0
2 0.0027 433904 DataTables\Editor->process( ) ../table.bezoekverslagen.php:95
3 0.0027 434248 DataTables\Editor->_process( ) ../Editor.php:677
4 0.0029 436504 DataTables\Editor->_get( ) ../Editor.php:883
5 2.5043 33546040 DataTables\Database\DriverMysqlResult->fetch( ) ../Editor.php:1014
6 2.5043 33546136 fetch ( ) ../Result.php:58
This question has an accepted answers - jump to answer
Answers
Yes. Try enabling server-side processing which should help.
The other option is to increase the PHP memory allocation.
Allan
It is a table of 36211 rows and I am using a where statement (that would result in only about ten records) but the error is here
this is my php code
I have also tried with a database that has about 3000 rows and I don't have any problems.
Is it really because the amount of rows?
Thanks!
Yes - although if you are using a
where
statement to reduce it to only 10 rows, that really shouldn't be causing an out of memory issue. My guess is that the statement isn't operating quite as it should and all of the rows (or perhaps a limited set, but enough to trigger the memory error) are being read.The issue is that the rows are being read into PHP's memory buffer, and its too small to cope with the amount of data.
Allan
Dear Allan, thanks! the server side processing is verry cool!! I can't get it to work together with "always shown textbox" Is that an error in my code or expectable?
Can you link to the page showing the issue so I can attempt to help debug it and resolve the issue.
I don't know of any reason why the always shown checkbox wouldn't work with server-side processing.
Allan
Dear Alan, the site is not public so I dont know how to share but thanks for your offer. Maybe I found it though, this is the error I am getting:
It does not seem to understand the value of column[0], when I comment this one
instead of this one
it loads but column[3] is a problem too
The problem is because rendered data is just a calculation again?
Ah! Thanks for the error message.
Set the client-side columns to not be orderable or searchable (
columns.orderable
andcolumns.searchable
) and also change the default ordering (order
) to be something other than the first column.That should do it.
What is happening is that the server is attempting to process a column it knows nothing about.
Allan
Thanks!!