CodeIgniter Forums
Codeigniter app freezes - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Codeigniter app freezes (/showthread.php?tid=19957)



Codeigniter app freezes - El Forum - 06-23-2009

[eluser]SnakeO[/eluser]
Greetings.

I have an app running on localhost under a MAMP stack. I have a page that has a large processing overhead (about 5 minutes). During this time, my CPU remains low (~20% usage), but none of the other application pages load. I can however continue to access webpages outside of the application. I thought this might be a database lock, so I created this function to test it with:

function doNothing(){
echo(time());
}

and even calling that function (via index.php/controller/doNothing) locks up! Why is this happening to me? Thank you.


Codeigniter app freezes - El Forum - 06-23-2009

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

Have you tried a cup of hot cocoa to unfreeze it?

I'm wondering if your server has some kind of flood/anti-spam protection, and if so, whether or not it's that kicking in.


Codeigniter app freezes - El Forum - 06-23-2009

[eluser]SnakeO[/eluser]
No, I'm running standard mac os x and a standard MAMP stack (http://www.mamp.info/de/index.html)


Codeigniter app freezes - El Forum - 06-23-2009

[eluser]SnakeO[/eluser]
also, some additional info:

once the problem page finishes processing, the other waiting pages instantly load.


Codeigniter app freezes - El Forum - 06-23-2009

[eluser]tonanbarbarian[/eluser]
then you should include the code of the page that is the problem
you should also be able to stop and restart the apache server to kill the processes that have stalled


Codeigniter app freezes - El Forum - 06-23-2009

[eluser]jedd[/eluser]
The database does seem the likely candidate, especially if your secondary apps are likely to choke on a lack of access to same. You say you've tested this, but does your DoNothing function exist within a controller whose constructor opens the db, or indeed do you extend via MY_Controller and do any database activity in there, or even more indeed - does it still happen if you remove the database class from your autoload?

If you crank up top you'll see if your problem is CPU or IOWAIT (or whatever it is on that child of *BSD that OSX has become). If it's a real Mac they probably do not like to concern you with a hard disk light, so this would be the next best thing to determining your bottleneck. It's also a good place to check memory usage pre- and post- web page being called.