CodeIgniter Forums
Exception details in log - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Exception details in log (/showthread.php?tid=88724)

Pages: 1 2


RE: Exception details in log - InsiteFX - 10-26-2023

The correct way is to edit your php.ini file. Edit memory_limit to your desire value.

As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously
wrong with your code as it should not take that much.

If you know why it takes that much and you want to allow it set memory_limit = 512M or higher and you should be good.


RE: Exception details in log - CIDave - 10-27-2023

(10-26-2023, 09:31 PM)InsiteFX Wrote: The correct way is to edit your php.ini file. Edit memory_limit to your desire value.

As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously
wrong with your code as it should not take that much.

If you know why it takes that much and you want to allow it set memory_limit = 512M or higher and you should be good.

I'm aware of there is an error and something is causing it.

My question is how can I get CodeIgniter to tell me what page the error occurred on? When it logs a critical error, it won't tell me which script/page caused the issue, just the stack trace from index.php to system calls.

This makes it infinitely hard to figure out this edge case.


RE: Exception details in log - kenjis - 10-27-2023

Why don't you check Apache's access log?


RE: Exception details in log - CIDave - 10-27-2023

(10-27-2023, 01:05 AM)kenjis Wrote: Why don't you check Apache's access log?

It's one way to do it, sure. But when you have 20k+ pageviews per day, narrowing down an apache access log for an error is difficult.

I'm just wondering why we can't get page url's added into the CodeIgniter Error logging since it gives us lots of useful information anyway, why not implement the page url too?


RE: Exception details in log - captain-sensible - 10-27-2023

[quote pid="413505" dateline="1698396656"]

It's one way to do it, sure. But when you have 20k+ pageviews per day, narrowing down an apache access log for an error is difficult.


Just maybe ... pipe through "grep" or equivalent from command line or bash script for key words that you have shown  one file at a time .   To be fair cant at this moment think of the code to do that ..
[/quote]


RE: Exception details in log - kenjis - 10-27-2023

@CIDave It is easy to answer the question. It is because nobody sent a Pull Request like that.

I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/8108


RE: Exception details in log - CIDave - 10-28-2023

(10-27-2023, 02:25 PM)kenjis Wrote: @CIDave It is easy to answer the question. It is because nobody sent a Pull Request like that.

I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/8108

Brilliant! I think a lot of people will find this useful Smile