![]() |
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
|
Exception details in log - CIDave - 10-25-2023 Hi! I keep finding that the log messages do not tell me much about where the error is coming from. For example, I found this error in our logs: Quote:CRITICAL - 2023-10-25 05:17:38 --> Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)How can I get the log message to tell me which URL/page was accessed that caused this error? It would allow me to better debug and figure out what is triggering this. RE: Exception details in log - captain-sensible - 10-25-2023 well depends on your dev setup but mine is apache on Arch Linux in /var/log/httpd i have : Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /srv/http/joesoapdev/app/Views/navbar.php on line 1 I enabled that in a vhost file located /etc/httpd/conf/vhosts with entries Code: <VirtualHost 127.0.0.3:80> RE: Exception details in log - CIDave - 10-25-2023 (10-25-2023, 06:09 AM)captain-sensible Wrote: well depends on your dev setup but mine is apache on Arch Linux in /var/log/httpd i have :Thanks for that. That is useful and something I can do; I was just wondering if CI had a native way to update their log files with the page that is being accessed. RE: Exception details in log - captain-sensible - 10-25-2023 in .env do you have threshhold to 9 Code: #-------------------------------------------------------------------- what is i see in /writable/logs looks quite verbose RE: Exception details in log - CIDave - 10-25-2023 (10-25-2023, 09:44 AM)captain-sensible Wrote: in .env do you have threshhold to 9 No I only set to critical/fail errors as this error was caught on our production server. If I set to 9, the log file will be spammed and generate to an enormous size. RE: Exception details in log - CIDave - 10-26-2023 I found the error in my apache log: Quote:[Wed Oct 25 05:17:38.520100 2023] [php:error] [pid 1171112] [client ***] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/public_html/system/Language/Language.php on line 197 Not really sure where to go from here since these are system files and it doesn't really tell me what page was accessed to cause it. RE: Exception details in log - captain-sensible - 10-26-2023 i would be tempted to "rsync " the whole production CI4 directory which you can do remote to local . Your server is linux looks like. So install same to a PC. Go for equivalent web server Apache or what ever . Dump MySQl or other db if need be into a file and import it local. So basically duplicate everything from live and use your local as your test bed for everything , then you can make changes if there all good on local to live server RE: Exception details in log - CIDave - 10-26-2023 (10-26-2023, 01:51 AM)captain-sensible Wrote: i would be tempted to "rsync " the whole production CI4 directory which you can do remote to local . Your server is linux looks like. So install same to a PC. Go for equivalent web server Apache or what ever . I already have a dev server and use git to push changes. I haven't seen this error occur on my dev server ever so still not sure how to debug. When I push to live, it gets 10k+ users a day so trying to figure out whatever specific issue is causing it can be quite hard lol. RE: Exception details in log - captain-sensible - 10-26-2023 what is on line 197 of Language.php ? RE: Exception details in log - CIDave - 10-26-2023 (10-26-2023, 02:09 AM)captain-sensible Wrote: what is on line 197 of Language.php ? https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/Language/Language.php Quote:$formatted = MessageFormatter::formatMessage($this->locale, $message, $args);I don't really use any locale functions on my site, so I'm assuming this is something to do with system-wide language support like pagination or something. But hard to figure out based on the error message. |