Gallery2 & PHP deadlocks

E-Razor
E-Razor's picture

Joined: 2005-01-07
Posts: 18
Posted: Fri, 2005-01-07 23:45

hi!

first of all, thanks for writing gallery, its really nice -)

So, now to the topic!
Im using gallery2 for some days now, everything works fine, but it looks like i'm getting some kind of php deadlocks.

Thing is, when i'm browsing the gallery, sometimes my browser still keeps loading, pressing abort should kill all php-processes.

this works for example when using
for ($a=0;$a<20;$a++) {
echo $a;
sleep(1);
} ?>

Well, having some died php-processes isn't the problem, but it looks like theyre locking the gallery too (after some time viewing the gallery is impossible cos i'm just getting a "loading" from my browser).

Now some facts about my system
gentoo, php-4.3.10-cgi, apache2 (tried -threads and +threads)

Im getting this stuff only when using gallery2, other webapps are working... and yeah it's not a browser problem.

Any hints?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-01-08 19:23

Pressing abort won't kill the PHP process in Apache 2 if you're not generating output. So some of our long running operations (like importing from G1, etc) will continue even after your browser goes away.

What were you trying to do when you hit abort? And what were you trying to do later on when you can't access the Gallery?

 
E-Razor
E-Razor's picture

Joined: 2005-01-07
Posts: 18
Posted: Wed, 2005-01-12 18:11

i think that happens when the main.php returns the thumbnails, cos the thumbs are the first things which will not work after a while.

>ressing abort won't kill the PHP process in Apache 2 if you're not generating output.
what about that thing? its a 20second loop, which creates output, right?
for ($a=0;$a<20;$a++) {
echo $a;
sleep(1);
}
anyway, it's not that problematic cos i'm using mod_php instead of php-cgi now.

 
RexM

Joined: 2005-01-11
Posts: 5
Posted: Wed, 2005-01-12 23:30

It sounds like I may have been having this problem as well, let me explain my problem to see if it's the same thing...

I was going to my gallery page to post some new pictures, the status at the bottom of firefox says "Transferring..." so I sat there for a while, and realized that it was frozen, I couldn't close firefox or anything. I tried to list the processes "ps aux" and that wouldn't even work.. so I CTRL+ALT+Backspace'd out of X and restarted X. It did it again.. so I went ahead and restarted my computer... I haven't had a problem since...

Not sure what was wrong with that, but.. whatever

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-01-13 08:08

Whoa. That's weird. But no matter what Gallery2 does, it can't lock up your browser unless your browser has a bug in it :-(

 
E-Razor
E-Razor's picture

Joined: 2005-01-07
Posts: 18
Posted: Sat, 2005-01-15 13:47

>But no matter what Gallery2 does, it can't lock up your browser unless your browser has a bug in it
*nods*
i've had no browser crash's (konqueror || mozilla)