-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory issue - Toolbar collects every query #1607
Comments
that's possible, though I've seen valid sites running upwards of 200 queries (think joomla type sites) so this would cause issues trying to track things down there. A solution for your current situation might be to turn off the query collection for the toolbar. You can do this by commenting out the DatabaseCollector in application/Config/Toolbar. Then no queries will be collected. |
200 queries should not cause any memory issues. 10.000 as in my case is a memory issue :D I solved my issue by commenting out this line |
Yup - 10,000 queries would definitely be an issue lol. I think adding a maxQueries setting to the Toolbar config would be a good addition here. That's probably how I'll solve this one. |
Just one question, which might be irrelevant to this issue. But how do I hide the CI4 debugging bar/button ? |
@tpw https://forum.codeigniter.com/thread-72292.html |
Thanks for reminding. |
I'm doing some heavy imports with a lot of queries.
After I fixed this issue I encountered another memory issue.
This time it is caused by the debug toolbar in non production environment.
It is collecting every query in an array at
CodeIgniter\Debug\Toolbar\Collectors\Database::collect
:A simple max on the array size should fix the problem. Ex.
This will cut the array in half every time it hits 100 elements.
The text was updated successfully, but these errors were encountered: