Reputation: 51
I was trying to do the next query:
SELECT
docs_sam.id as id_doc,
docs_sam.title as nom_doc,
docs_sam.author as autor,
docs_sam.status as estat_doc,
docs_sam.sent as sent,
docs_sam.cdate as data,
main_clients.name as nomClient
FROM
main_clients INNER JOIN docs_sam
ON main_clients.id = docs_sam.clientid
ORDER BY docs_sam.cdate DESC;
when the phpmyadmin crashes and show the next error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /opt/lampp/phpmyadmin/libraries/session.inc.php on line 101
I have an app mounted onto a database that works onto the system, but now every time I try to start 'phpmyadmin' shows this error.
If I do an unset of $_COOKIE in the code of phpmyadmin it works one time, but when I try to do something the system crashes again. Sorry for my english, and thanks
Upvotes: 5
Views: 11915
Reputation: 32290
To query large datasets in phpMyAdmin, the best practice is to limit the resultset and allow phpMyAdmin to use pagination.
Don't do changes to the memory limit, it does not solve the problem, only allows the problem to get bigger.
SELECT
docs_sam.id as id_doc,
docs_sam.title as nom_doc,
docs_sam.author as autor,
docs_sam.status as estat_doc,
docs_sam.sent as sent,
docs_sam.cdate as data,
main_clients.name as nomClient
FROM
main_clients INNER JOIN docs_sam
ON main_clients.id = docs_sam.clientid
ORDER BY docs_sam.cdate DESC
LIMIT 0, 50;
Upvotes: 0
Reputation: 303
I used this way, it solved my problem, when I import file with format .sql.zip.
Go to
C:\Wamp\bin\apache2.2.11\bin\php.ini
Then set
memory_limit = -1
See more to clear problem.
Upvotes: 6
Reputation: 2300
Don't do that query. The result set is too large ;)
Actually, that's what, 134MB? You'll need to check with the server administrator to see if they will allow PHP to use that much memory.
If you are the server administrator (and you do have enough RAM to do this), you can adjust the value of "memory_limit" in php.ini to a value larger than 128MB.
Upvotes: 2