Out of memory issues |
I'm running large reports (but not huge ones), using v4.1.3 and I'm running out of memory.
I've inserted memory cleanup (unsetting all variables after use, manually calling memory cleanups, etc) in the controller. According to the memory usage, I'm not peaking over 56MB at the end of execution of the controller, but, in the system logs, we're seeing it die after it attempts to get past 134mb. What is happening in Code Igniter to get from 56MB to 134MB? Exact error message: Allowed memory size of 134217728 bytes exhausted PHP memory used command in the CI log (COMPANY is the controller name): ERROR - 2022-08-19 06:22:30 --> COMPANY CLOSE:56115072 MAX:56252432 Ideas?
I upped the memory to 1024MB in the PHP.ini file which also resolved the issue.
As best I was able to research, the view copies the passed variables into an internal variable (which doubles the size, at least) plus other memory loading things. So I presume the initial code was too large to begin with.
v4.1.3 has security vulnerabilities.
I recommend you upgrade. See https://github.com/codeigniter4/CodeIgni...advisories |
Welcome Guest, Not a member yet? Register Sign In |