I have an application developed on PHP codeigniter (‘CI_VERSION’, ‘2.2.6’); and Mysql. this is hosted on XAMPP. The application was running fine and suddenly on may 22 the CPU usage has gone up to 95%. and mysqld shows more that 85%CPU usage screen shot and i am encountering the issue of fatal error error log and from then the issue is continuing. the URL shown in the log is calling an API…could the slowness in getting response from the API be a reason?
It is also observed that the login screen also opens very slow.
i tried increasing the memory in php.ini, but no use.
in the diagnostics there is no slow running query, nor there are any locks on row or table.
the the application continuously has low performance.
How to resolve this issue?
i tried increasing the memory in php.ini file and restarted Apache, but of no use.
i want to bring down the cpu usage and increase the performance of the application
2
Answers
Out Of Memory means, you are fetching the data more than the limit size of your PHP
Check your PHP Memory Limit
you can increase it, if you want to fetch all the data at once
or you can try to fetch data in small chunks. try Pagination.
If you need to debug it please check my gig on https://www.fiverr.com/s/6YbGdQR