Another day, another issue. In testing my new FreeBSD port, I’ve had to start and restart the server several times. I noticed that the server was taking a long time to stop. It didn’t matter if it was a hard restart or a graceful restart.
After turning on tracing, I found that pthread_join() was taking several seconds to stop some of the threads.
My question – Has anyone else noticed slowness (in the order of over 5-10 seconds and more!) when restarting Cherokee? During this time, all IO is blocked, so nothing can be served, which is a bit of a problem. While restarting rarely happens, it makes it difficult for making quick changes.
I’m trying to figure out if it’s just something with FreeBSD or if it’s happening with other OS’s as well, so input from anyone is welcome.
Jaime
Pablo
On 6/19/09, Jaime Bozza <jbo...@mindsites.com> wrote:
> Another day, another issue. In testing my new FreeBSD port, I've had to
> start and restart the server several times. I noticed that the server was
> taking a long time to stop. It didn't matter if it was a hard restart or a
> graceful restart.
>
> After turning on tracing, I found that pthread_join() was taking several
> seconds to stop some of the threads.
>
> My question - Has anyone else noticed slowness (in the order of over 5-10
> seconds and more!) when restarting Cherokee? During this time, all IO is
> blocked, so nothing can be served, which is a bit of a problem. While
> restarting rarely happens, it makes it difficult for making quick changes.
>
> I'm trying to figure out if it's just something with FreeBSD or if it's
> happening with other OS's as well, so input from anyone is welcome.
>
> Jaime
>
>
>
--
Sent from Gmail for mobile | mobile.google.com
_______________________________________________
Cherokee mailing list
Cher...@lists.octality.com
http://lists.octality.com/listinfo/cherokee
I haven't noticed such behavior in any modern version.
Which version are you running?
--
Octality
http://www.octality.com/
> My question – Has anyone else noticed slowness (in the
> order of over 5-10 seconds and more!) when restarting Cherokee? During this
> time, all IO is blocked, so nothing can be served, which is a bit of a
> problem. While restarting rarely happens, it makes it difficult for making
> quick changes.
I'll post my observations here as well.
In reading your post about issue with threads I watched my server restart more
closely. I guess it does actually take a little bit of time to kill the process.
It looks like this for example:
Stopping cherokee.
Waiting for PIDS: 38173, 38173, 38173, 38173, 38173.
It's always the list of 5 PIDS. I've always assumed it just waiting for the
5 php-cgi child processes to die. So I tried a restart immediately after the
server was restarted, and before any php-cgi processes were started, and it's
actually the same thing, the 5 repeated PIDS before it's done. Without looking
at a watch I counted about 6 or 7 seconds before it was complete. Startup on the
other hand is next to instantaneous.
This is also on FreeBSD. FreeBSD 7.2-RELEASE-p1.
I also have cherokee 0.99.17 (from the "sid" repository) running on my Debian
5.01 (Mostly Lenny, some mixed packages) server at home. I watched the restart
on it, and it is definitely faster. Maybe 2-3 seconds before the process stops
and then the same near instantaneous startup.
Hope that is useful information.
Jason
Hi Jaime,
Thanks for sharing your port. I'll look into it over the weekend. My box is for testing purposes and runs 7.2-STABLE x86. I'll let you know as soon as test it.
Cheers
PabloOn Fri, Jun 19, 2009 at 9:01 PM, Jaime Bozza <jbo...@mindsites.com> wrote:Pablo,
Attached is the port. I'm using 7.2-STABLE Amd64. I'm starting Cherokee just with the default config, but I'm keeping it in the foreground so I can see what's happening. Using Cherokee-Admin and doing a graceful restart causing the Cherokee process to immediately show that it received the graceful restart, but for several seconds it sits there before bringing up the information banner (showing that the process restarted) again.
Load while Cherokee is running doesn't seem to be an issue - Just the restart.
Thanks for your help!
Jaime
> It's always the list of 5 PIDS. I've always assumed it just waiting
> for the
> 5 php-cgi child processes to die. So I tried a restart immediately
> after the
> server was restarted, and before any php-cgi processes were started,
> and it's
> actually the same thing, the 5 repeated PIDS before it's done.
> Without looking
> at a watch I counted about 6 or 7 seconds before it was complete.
> Startup on the
> other hand is next to instantaneous.
>
> This is also on FreeBSD. FreeBSD 7.2-RELEASE-p1.
>
> I also have cherokee 0.99.17 (from the "sid" repository) running on
> my Debian
> 5.01 (Mostly Lenny, some mixed packages) server at home. I watched
> the restart
> on it, and it is definitely faster. Maybe 2-3 seconds before the
> process stops
> and then the same near instantaneous startup.
I've tested it on Linux and MacOS X. In both cases it restarted in a
fairly acceptable time.
Anyway, it sounds like something worth checking (at least on FreeBSD).
Could you please log a bug for it so we ensure it's in the to-do list?
http://bugs.cherokee-project.com/
Thanks!
--
Octality
http://www.octality.com/
> Anyway, it sounds like something worth checking (at least on FreeBSD).
> Could you please log a bug for it so we ensure it's in the to-do list?
>
> http://bugs.cherokee-project.com/
>
> Thanks!
Done! ID #500!
Thanks,
Jason
0.99.17 - Just updated to 0.99.18 to see if the results are the same. System is a newly built Quad Core (Intel) with FreeBSD 7.2-STABLE 64-bit.
Similar results on 7.2-STABLE 32-bit, though not as long.
I see that Jason has already published a bug, so I'll post my trace results there.
Jaime
Pablo,
Can you try the following?
1) Install Cherokee using the default cherokee.conf file. This just serves up the default cherokee page.
2) Start the server using the FreeBSD RC script
3) Wait a minute, restart the server using /usr/local/etc/rc.d/cherokee restart
4) Observe the number of times the system is “Waiting for PIDS”
Typically, it shouldn’t have to wait hardly at all.
It’s possible that adding PHP to the mix may “fix” the issue, which I’ll test in a little bit, but I’ve just been testing core functionality first.
Jaime
Pablo,
One last question – Are you operating under an SMP kernel or is it just a single core processor?