Welcome Guest, Not a member yet? Register   Sign In
Codeigniter app freezes


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(){

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

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.

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

also, some additional info:

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

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

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.

Theme © iAndrew 2016 - Forum software by © MyBB