public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Performance once again..
@ 2003-04-12 19:09 Benjamin Podszun
  2003-04-12 19:13 ` Jon Portnoy
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 19:09 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

Hi there.
I switched to Gentoo on two of my servers recently. Before that I used
Debian stable with a 2.4.18-Kernel.
Right now the machines are nearly useless. They should serve lots of
pages, but every ~24h everything freezes without any load on the
machines.. The load drops to 0.01 and nothing is delivered.
Only a restart of apache resets this timeframe again.
Well, after searching for a solution for about 3-4 days I'm already in
the mood to wipe Gentoo, install Debian again and stay with Gentoo for
Desktop only..
If anyone has any suggestions I'd be glad to give them a try, but I
cannot afford to have two systems down on a regular basis for more than
2-3 days..

I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
special but exim and apache/php.
All of them use the most current ebuilds in the x86 portage-tree.
I wonder if this is related to the problems someone pointed out with the
select() performance? But it would be a vanilla-problem then?

TIA for any suggestions,
Ben

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 19:09 [gentoo-dev] Performance once again Benjamin Podszun
@ 2003-04-12 19:13 ` Jon Portnoy
  2003-04-12 19:44   ` Benjamin Podszun
  2003-04-12 20:24 ` Brian Jackson
  2003-04-14  8:51 ` Václav Hůla
  2 siblings, 1 reply; 27+ messages in thread
From: Jon Portnoy @ 2003-04-12 19:13 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: gentoo-dev

Sounds more like an Apache bug then...

On Sat, Apr 12, 2003 at 09:09:31PM +0200, Benjamin Podszun wrote:
> Hi there.
> I switched to Gentoo on two of my servers recently. Before that I used
> Debian stable with a 2.4.18-Kernel.
> Right now the machines are nearly useless. They should serve lots of
> pages, but every ~24h everything freezes without any load on the
> machines.. The load drops to 0.01 and nothing is delivered.
> Only a restart of apache resets this timeframe again.
> Well, after searching for a solution for about 3-4 days I'm already in
> the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> Desktop only..
> If anyone has any suggestions I'd be glad to give them a try, but I
> cannot afford to have two systems down on a regular basis for more than
> 2-3 days..
> 
> I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> special but exim and apache/php.
> All of them use the most current ebuilds in the x86 portage-tree.
> I wonder if this is related to the problems someone pointed out with the
> select() performance? But it would be a vanilla-problem then?
> 
> TIA for any suggestions,
> Ben



-- 
Jon Portnoy
avenj/irc.freenode.net

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 19:13 ` Jon Portnoy
@ 2003-04-12 19:44   ` Benjamin Podszun
  2003-04-12 19:54     ` Jon Portnoy
  0 siblings, 1 reply; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 19:44 UTC (permalink / raw
  To: Jon Portnoy; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

On Sat, 2003-04-12 at 21:13, Jon Portnoy wrote:
> Sounds more like an Apache bug then...

Debian:
jay:~# apt-cache policy apache
apache:
  Installed: 1.3.27-0.1

Gentoo:
*  net-www/apache
      Latest version available: 1.3.27-r3
      Latest version installed: 1.3.27-r3

Uhm.. I don't see any difference.. How can I search for a problem here?

> On Sat, Apr 12, 2003 at 09:09:31PM +0200, Benjamin Podszun wrote:
> > Hi there.
> > I switched to Gentoo on two of my servers recently. Before that I used
> > Debian stable with a 2.4.18-Kernel.
> > Right now the machines are nearly useless. They should serve lots of
> > pages, but every ~24h everything freezes without any load on the
> > machines.. The load drops to 0.01 and nothing is delivered.
> > Only a restart of apache resets this timeframe again.
> > Well, after searching for a solution for about 3-4 days I'm already in
> > the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> > Desktop only..
> > If anyone has any suggestions I'd be glad to give them a try, but I
> > cannot afford to have two systems down on a regular basis for more than
> > 2-3 days..
> > 
> > I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> > special but exim and apache/php.
> > All of them use the most current ebuilds in the x86 portage-tree.
> > I wonder if this is related to the problems someone pointed out with the
> > select() performance? But it would be a vanilla-problem then?
> > 
> > TIA for any suggestions,
> > Ben
> 
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 19:44   ` Benjamin Podszun
@ 2003-04-12 19:54     ` Jon Portnoy
  0 siblings, 0 replies; 27+ messages in thread
From: Jon Portnoy @ 2003-04-12 19:54 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: gentoo-dev

You may want to keep an eye on apache in top and see if RSS grows 
significantly.

It sounds like the box is probably running out of RAM. Perhaps a memleak 
in Apache.

On Sat, Apr 12, 2003 at 09:44:32PM +0200, Benjamin Podszun wrote:
> On Sat, 2003-04-12 at 21:13, Jon Portnoy wrote:
> > Sounds more like an Apache bug then...
> 
> Debian:
> jay:~# apt-cache policy apache
> apache:
>   Installed: 1.3.27-0.1
> 
> Gentoo:
> *  net-www/apache
>       Latest version available: 1.3.27-r3
>       Latest version installed: 1.3.27-r3
> 
> Uhm.. I don't see any difference.. How can I search for a problem here?
> 
> > On Sat, Apr 12, 2003 at 09:09:31PM +0200, Benjamin Podszun wrote:
> > > Hi there.
> > > I switched to Gentoo on two of my servers recently. Before that I used
> > > Debian stable with a 2.4.18-Kernel.
> > > Right now the machines are nearly useless. They should serve lots of
> > > pages, but every ~24h everything freezes without any load on the
> > > machines.. The load drops to 0.01 and nothing is delivered.
> > > Only a restart of apache resets this timeframe again.
> > > Well, after searching for a solution for about 3-4 days I'm already in
> > > the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> > > Desktop only..
> > > If anyone has any suggestions I'd be glad to give them a try, but I
> > > cannot afford to have two systems down on a regular basis for more than
> > > 2-3 days..
> > > 
> > > I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> > > special but exim and apache/php.
> > > All of them use the most current ebuilds in the x86 portage-tree.
> > > I wonder if this is related to the problems someone pointed out with the
> > > select() performance? But it would be a vanilla-problem then?
> > > 
> > > TIA for any suggestions,
> > > Ben
> > 
> > 



-- 
Jon Portnoy
avenj/irc.freenode.net

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 19:09 [gentoo-dev] Performance once again Benjamin Podszun
  2003-04-12 19:13 ` Jon Portnoy
@ 2003-04-12 20:24 ` Brian Jackson
  2003-04-12 20:32   ` Benjamin Podszun
  2003-04-14  8:51 ` Václav Hůla
  2 siblings, 1 reply; 27+ messages in thread
From: Brian Jackson @ 2003-04-12 20:24 UTC (permalink / raw
  To: gentoo-dev

I think I've got to agree with Jon on this one, without more info, it looks 
like an Apache/Apache config issue.

--Brian

On Saturday 12 April 2003 02:09 pm, Benjamin Podszun wrote:
> Hi there.
> I switched to Gentoo on two of my servers recently. Before that I used
> Debian stable with a 2.4.18-Kernel.
> Right now the machines are nearly useless. They should serve lots of
> pages, but every ~24h everything freezes without any load on the
> machines.. The load drops to 0.01 and nothing is delivered.
> Only a restart of apache resets this timeframe again.
> Well, after searching for a solution for about 3-4 days I'm already in
> the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> Desktop only..
> If anyone has any suggestions I'd be glad to give them a try, but I
> cannot afford to have two systems down on a regular basis for more than
> 2-3 days..
>
> I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> special but exim and apache/php.
> All of them use the most current ebuilds in the x86 portage-tree.
> I wonder if this is related to the problems someone pointed out with the
> select() performance? But it would be a vanilla-problem then?
>
> TIA for any suggestions,
> Ben


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 20:24 ` Brian Jackson
@ 2003-04-12 20:32   ` Benjamin Podszun
  2003-04-12 20:38     ` Hasse Hagen Johansen
  2003-04-12 20:45     ` Robin H.Johnson
  0 siblings, 2 replies; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 20:32 UTC (permalink / raw
  To: Brian Jackson; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

What kind of Infos?

The Apache-Version is the same, so is the configuration.
The only thing that I noticed is that one apache instance sucks up to
99% CPU... It never uses less than 30% ..
And since this is a Compaq Server with Dual P3 1GHz and 2GB RAM I doubt
that this is right (tm).

Any new insights?

On Sat, 2003-04-12 at 22:24, Brian Jackson wrote:
> I think I've got to agree with Jon on this one, without more info, it looks 
> like an Apache/Apache config issue.
> 
> --Brian
> 
> On Saturday 12 April 2003 02:09 pm, Benjamin Podszun wrote:
> > Hi there.
> > I switched to Gentoo on two of my servers recently. Before that I used
> > Debian stable with a 2.4.18-Kernel.
> > Right now the machines are nearly useless. They should serve lots of
> > pages, but every ~24h everything freezes without any load on the
> > machines.. The load drops to 0.01 and nothing is delivered.
> > Only a restart of apache resets this timeframe again.
> > Well, after searching for a solution for about 3-4 days I'm already in
> > the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> > Desktop only..
> > If anyone has any suggestions I'd be glad to give them a try, but I
> > cannot afford to have two systems down on a regular basis for more than
> > 2-3 days..
> >
> > I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> > special but exim and apache/php.
> > All of them use the most current ebuilds in the x86 portage-tree.
> > I wonder if this is related to the problems someone pointed out with the
> > select() performance? But it would be a vanilla-problem then?
> >
> > TIA for any suggestions,
> > Ben
> 
> 
> --
> gentoo-dev@gentoo.org mailing list
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 20:32   ` Benjamin Podszun
@ 2003-04-12 20:38     ` Hasse Hagen Johansen
  2003-04-12 20:44       ` Benjamin Podszun
  2003-04-12 20:45     ` Robin H.Johnson
  1 sibling, 1 reply; 27+ messages in thread
From: Hasse Hagen Johansen @ 2003-04-12 20:38 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]

Have you checked if debian is using any special patches for that apache
version? (you can see that if you get the source package, and look in
the patches directory)

Hasse

On Sat, 2003-04-12 at 22:32, Benjamin Podszun wrote:
> What kind of Infos?
> 
> The Apache-Version is the same, so is the configuration.
> The only thing that I noticed is that one apache instance sucks up to
> 99% CPU... It never uses less than 30% ..
> And since this is a Compaq Server with Dual P3 1GHz and 2GB RAM I doubt
> that this is right (tm).
> 
> Any new insights?
> 
> On Sat, 2003-04-12 at 22:24, Brian Jackson wrote:
> > I think I've got to agree with Jon on this one, without more info, it looks 
> > like an Apache/Apache config issue.
> > 
> > --Brian
> > 
> > On Saturday 12 April 2003 02:09 pm, Benjamin Podszun wrote:
> > > Hi there.
> > > I switched to Gentoo on two of my servers recently. Before that I used
> > > Debian stable with a 2.4.18-Kernel.
> > > Right now the machines are nearly useless. They should serve lots of
> > > pages, but every ~24h everything freezes without any load on the
> > > machines.. The load drops to 0.01 and nothing is delivered.
> > > Only a restart of apache resets this timeframe again.
> > > Well, after searching for a solution for about 3-4 days I'm already in
> > > the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> > > Desktop only..
> > > If anyone has any suggestions I'd be glad to give them a try, but I
> > > cannot afford to have two systems down on a regular basis for more than
> > > 2-3 days..
> > >
> > > I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> > > special but exim and apache/php.
> > > All of them use the most current ebuilds in the x86 portage-tree.
> > > I wonder if this is related to the problems someone pointed out with the
> > > select() performance? But it would be a vanilla-problem then?
> > >
> > > TIA for any suggestions,
> > > Ben
> > 
> > 
> > --
> > gentoo-dev@gentoo.org mailing list
> > 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 20:38     ` Hasse Hagen Johansen
@ 2003-04-12 20:44       ` Benjamin Podszun
  2003-04-12 22:25         ` Martin Schlemmer
  0 siblings, 1 reply; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 20:44 UTC (permalink / raw
  To: Hasse Hagen Johansen; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2801 bytes --]

jay:~/apache-1.3.27/debian/patches# ls
ab_overzealous_connections     mime_type_fix
apxs_assumes_dso               mod_bandwidth_paths
apxs_wrong_prefix              phf_dot_log
custom_response_segfaults     
regex_must_conform_to_posix_for_LFS_to_work
dbm_part_2_the_revenge         server_subversioning
debian_config_layout           suexec_combined
debian_ps_is_brutal            suexec_of_death
debian_requires_fPIC           thetarget_unquoted
hurd_compile_fix_for_upstream  usr_bin_perl_owns_you

Uhm.. That's not really helpful for me... Any other ideas?

On Sat, 2003-04-12 at 22:38, Hasse Hagen Johansen wrote:
> Have you checked if debian is using any special patches for that apache
> version? (you can see that if you get the source package, and look in
> the patches directory)
> 
> Hasse
> 
> On Sat, 2003-04-12 at 22:32, Benjamin Podszun wrote:
> > What kind of Infos?
> > 
> > The Apache-Version is the same, so is the configuration.
> > The only thing that I noticed is that one apache instance sucks up to
> > 99% CPU... It never uses less than 30% ..
> > And since this is a Compaq Server with Dual P3 1GHz and 2GB RAM I doubt
> > that this is right (tm).
> > 
> > Any new insights?
> > 
> > On Sat, 2003-04-12 at 22:24, Brian Jackson wrote:
> > > I think I've got to agree with Jon on this one, without more info, it looks 
> > > like an Apache/Apache config issue.
> > > 
> > > --Brian
> > > 
> > > On Saturday 12 April 2003 02:09 pm, Benjamin Podszun wrote:
> > > > Hi there.
> > > > I switched to Gentoo on two of my servers recently. Before that I used
> > > > Debian stable with a 2.4.18-Kernel.
> > > > Right now the machines are nearly useless. They should serve lots of
> > > > pages, but every ~24h everything freezes without any load on the
> > > > machines.. The load drops to 0.01 and nothing is delivered.
> > > > Only a restart of apache resets this timeframe again.
> > > > Well, after searching for a solution for about 3-4 days I'm already in
> > > > the mood to wipe Gentoo, install Debian again and stay with Gentoo for
> > > > Desktop only..
> > > > If anyone has any suggestions I'd be glad to give them a try, but I
> > > > cannot afford to have two systems down on a regular basis for more than
> > > > 2-3 days..
> > > >
> > > > I installed 1.4, used the 2.4.20 vanilla-kernel and I installed nothing
> > > > special but exim and apache/php.
> > > > All of them use the most current ebuilds in the x86 portage-tree.
> > > > I wonder if this is related to the problems someone pointed out with the
> > > > select() performance? But it would be a vanilla-problem then?
> > > >
> > > > TIA for any suggestions,
> > > > Ben
> > > 
> > > 
> > > --
> > > gentoo-dev@gentoo.org mailing list
> > > 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 20:32   ` Benjamin Podszun
  2003-04-12 20:38     ` Hasse Hagen Johansen
@ 2003-04-12 20:45     ` Robin H.Johnson
  2003-04-12 21:46       ` Benjamin Podszun
  1 sibling, 1 reply; 27+ messages in thread
From: Robin H.Johnson @ 2003-04-12 20:45 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: Brian Jackson, gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Sat, Apr 12, 2003 at 10:32:00PM +0200, Benjamin Podszun wrote:
> The Apache-Version is the same, so is the configuration.
> The only thing that I noticed is that one apache instance sucks up to
> 99% CPU... It never uses less than 30% ..
> And since this is a Compaq Server with Dual P3 1GHz and 2GB RAM I doubt
> that this is right (tm).
Do you use PHP (and possibly MySQL) on that machine? I saw that problem
on my Slackware box a few months ago. I never did find the solution tho,
as I upgraded to Apache2. I did confirm that the bug didn't occur when
PHP wasn't being used for me. For some reason, PHP seemed to be in a
massive loop after the page was sent, eating CPU and memory.

A good temporary workaround is to have a little watcher shell script
that looks for any apache processes that have been eating >80% CPU for
the all of the last 30 seconds (I checked at 30 second intervals) and
send a SIGKILL to them.

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 20:45     ` Robin H.Johnson
@ 2003-04-12 21:46       ` Benjamin Podszun
  2003-04-12 22:05         ` leahcim
                           ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 21:46 UTC (permalink / raw
  To: Robin H.Johnson; +Cc: Brian Jackson, gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

On Sat, 2003-04-12 at 22:45, Robin H.Johnson wrote:
> On Sat, Apr 12, 2003 at 10:32:00PM +0200, Benjamin Podszun wrote:
> > The Apache-Version is the same, so is the configuration.
> > The only thing that I noticed is that one apache instance sucks up to
> > 99% CPU... It never uses less than 30% ..
> > And since this is a Compaq Server with Dual P3 1GHz and 2GB RAM I doubt
> > that this is right (tm).
> Do you use PHP (and possibly MySQL) on that machine? I saw that problem
> on my Slackware box a few months ago. I never did find the solution tho,
> as I upgraded to Apache2. I did confirm that the bug didn't occur when
> PHP wasn't being used for me. For some reason, PHP seemed to be in a
> massive loop after the page was sent, eating CPU and memory.

Uhm.. Yes, I use Apache and PHP. MySQL as well, but not on that host (3
production servers, two of them only with apache/php, both compaq as
stated above, the third only serves as DB-Server. Both Webserver have
that problem.

You upgraded to Apache2? I guess (hope?) that you don't talk about
production environments? I tried to use Apache2 with PHP twice and
wouldn't recommend it to anyone.. It's just buggy and not usable. As my
current Gentoo-Servers are.. *cough*

> A good temporary workaround is to have a little watcher shell script
> that looks for any apache processes that have been eating >80% CPU for
> the all of the last 30 seconds (I checked at 30 second intervals) and
> send a SIGKILL to them.

Well, that's an ugly hack.. Yes, thanks for the hint, but I already
thought about something like this.. And I don't think that it solves a
single problem, nor is it a suitable solution on a (I love this word)
production environment.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 21:46       ` Benjamin Podszun
@ 2003-04-12 22:05         ` leahcim
  2003-04-12 22:09         ` Robin H.Johnson
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 27+ messages in thread
From: leahcim @ 2003-04-12 22:05 UTC (permalink / raw
  To: gentoo-dev

On Sat, Apr 12, 2003 at 11:46:40PM +0200, Benjamin Podszun wrote:
> Well, that's an ugly hack.. Yes, thanks for the hint, but I already
> thought about something like this.. And I don't think that it solves a
> single problem, nor is it a suitable solution on a (I love this word)
> production environment.

It's two words. You should get to like "testing environment" just as much :o)

The best recommendation is to (a) get a system in a testing environment to sort
out what the problem is without the emotive comments (b) roll back to your
previous working environment and (c) promote those responsible to middle management
;)

-- 
Michael.


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 21:46       ` Benjamin Podszun
  2003-04-12 22:05         ` leahcim
@ 2003-04-12 22:09         ` Robin H.Johnson
  2003-04-12 22:17         ` Brad Laue
  2003-04-12 22:32         ` Terje Kvernes
  3 siblings, 0 replies; 27+ messages in thread
From: Robin H.Johnson @ 2003-04-12 22:09 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: Robin H.Johnson, Brian Jackson, gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2265 bytes --]

On Sat, Apr 12, 2003 at 11:46:40PM +0200, Benjamin Podszun wrote:
> > Do you use PHP (and possibly MySQL) on that machine? I saw that problem
> > on my Slackware box a few months ago. I never did find the solution tho,
> > as I upgraded to Apache2. I did confirm that the bug didn't occur when
> > PHP wasn't being used for me. For some reason, PHP seemed to be in a
> > massive loop after the page was sent, eating CPU and memory.
> Uhm.. Yes, I use Apache and PHP. MySQL as well, but not on that host (3
> production servers, two of them only with apache/php, both compaq as
> stated above, the third only serves as DB-Server. Both Webserver have
> that problem.
Hmm, so that partially excludes PHP.

> You upgraded to Apache2? I guess (hope?) that you don't talk about
> production environments? I tried to use Apache2 with PHP twice and
> wouldn't recommend it to anyone.. It's just buggy and not usable. As my
> current Gentoo-Servers are.. *cough*
Some of the early Apache2+PHP releases weren't stable at all, I will
agree with that, but the more recent ones have been very good. Esp.
since Apache froze their API making things somewhat easier.

I _do_ run them in production enviroments. I've seen a big performance
increase by using Apache2 there. Before deploying on production
enviroments, I go thru a lot of work to test stuff throughly, including
running Apache2 on the development and prototyping machines for at least
a month. Presently we have been using Apache2 for about 6 months in
production enviroments, and we have recently (2 weeks ago) rolled MySQL4
out to production use.

> Well, that's an ugly hack.. Yes, thanks for the hint, but I already
> thought about something like this.. And I don't think that it solves a
> single problem, nor is it a suitable solution on a (I love this word)
> production environment.
Yeah, it doesn't solve the problem, but it does stop the Apache from
taking out the entire server. It caused OOM conditions in some of my
boxes when it did that.

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 21:46       ` Benjamin Podszun
  2003-04-12 22:05         ` leahcim
  2003-04-12 22:09         ` Robin H.Johnson
@ 2003-04-12 22:17         ` Brad Laue
  2003-04-12 22:35           ` Benjamin Podszun
  2003-04-12 22:32         ` Terje Kvernes
  3 siblings, 1 reply; 27+ messages in thread
From: Brad Laue @ 2003-04-12 22:17 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: Robin H.Johnson, Brian Jackson, gentoo-dev

On Sat, 2003-04-12 at 17:46, Benjamin Podszun wrote:

> You upgraded to Apache2? I guess (hope?) that you don't talk about
> production environments? I tried to use Apache2 with PHP twice and
> wouldn't recommend it to anyone.. It's just buggy and not usable. As my
> current Gentoo-Servers are.. *cough*

Hardware configuration? Amount of RAM? Number of CPU's? What specific
revision of gentoo-sources? Have you tried vanilla-sources or alan cox's
patchset? What configuration options had you given the Debian kernel and
do they differ from those you gave to Gentoo's kernel?

Have you tried 2.4.18 under Gentoo to see if it solves your problems?

This isn't a matter of Debian working and Gentoo not working; there's a
configuration difference between the two, that's all.

Brad

--
// -- http://www.BRAD-X.com/ -- //


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 20:44       ` Benjamin Podszun
@ 2003-04-12 22:25         ` Martin Schlemmer
  2003-04-12 22:55           ` Benjamin Podszun
  0 siblings, 1 reply; 27+ messages in thread
From: Martin Schlemmer @ 2003-04-12 22:25 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: Hasse Hagen Johansen, Gentoo-Dev

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

On Sat, 2003-04-12 at 22:44, Benjamin Podszun wrote:
> jay:~/apache-1.3.27/debian/patches# ls
> ab_overzealous_connections     mime_type_fix
> apxs_assumes_dso               mod_bandwidth_paths
> apxs_wrong_prefix              phf_dot_log
> custom_response_segfaults     
> regex_must_conform_to_posix_for_LFS_to_work
> dbm_part_2_the_revenge         server_subversioning
> debian_config_layout           suexec_combined
> debian_ps_is_brutal            suexec_of_death
> debian_requires_fPIC           thetarget_unquoted
> hurd_compile_fix_for_upstream  usr_bin_perl_owns_you
> 
> Uhm.. That's not really helpful for me... Any other ideas?
> 

Could you attach patches:

  ab_overzealous_connections
  mod_bandwidth_paths
  suexec_combined
  suexec_of_death
  usr_bin_perl_owns_you

Although I do not think the last are related.  


-- 

Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 21:46       ` Benjamin Podszun
                           ` (2 preceding siblings ...)
  2003-04-12 22:17         ` Brad Laue
@ 2003-04-12 22:32         ` Terje Kvernes
  3 siblings, 0 replies; 27+ messages in thread
From: Terje Kvernes @ 2003-04-12 22:32 UTC (permalink / raw
  To: gentoo-dev

Benjamin Podszun <ben@galactic-tales.de> writes:

  [ ... ]

> You upgraded to Apache2? I guess (hope?) that you don't talk about
> production environments? I tried to use Apache2 with PHP twice and
> wouldn't recommend it to anyone.. 

  at $ORK we run Apache2 off RedHat with PHP and Mysql / Postgresql
  backends.  works like a charm actually.  some weird locking issues
  on restarts, but except for that it just works[tm].  this is on
  RedHat 8.0.

-- 
Terje

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 22:17         ` Brad Laue
@ 2003-04-12 22:35           ` Benjamin Podszun
       [not found]             ` <1050187146.3931.12.camel@nexus6.musikcheck.dk>
  2003-04-13  0:22             ` Brad Laue
  0 siblings, 2 replies; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 22:35 UTC (permalink / raw
  To: brad; +Cc: Robin H.Johnson, Brian Jackson, gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

On Sun, 2003-04-13 at 00:17, Brad Laue wrote:
> On Sat, 2003-04-12 at 17:46, Benjamin Podszun wrote:
> 
> > You upgraded to Apache2? I guess (hope?) that you don't talk about
> > production environments? I tried to use Apache2 with PHP twice and
> > wouldn't recommend it to anyone.. It's just buggy and not usable. As my
> > current Gentoo-Servers are.. *cough*
> 
> Hardware configuration? Amount of RAM? Number of CPU's? What specific
> revision of gentoo-sources? Have you tried vanilla-sources or alan cox's
> patchset? What configuration options had you given the Debian kernel and
> do they differ from those you gave to Gentoo's kernel?

Uhm.. I did post my hardware, but maybe it wasn't clear enough in all my
messages.
Compaq-Server, 2 1GHz CPUs, 2GB RAM, no special hardware, apart from
Smart Arrays..
Vanilla-sources 2.4.20

Debian:
vanilla 2.4.18, built with the "normal" way, no deb-package

> Have you tried 2.4.18 under Gentoo to see if it solves your problems?

Yes, no difference

> This isn't a matter of Debian working and Gentoo not working; there's a
> configuration difference between the two, that's all.

Yes, I don't doubt it. But I copied the php.ini, apache-config-files and
I don't see the difference. The only thing I see is that apache sucks up
to 99% CPU (I don't know if it was the same on the Debian system,
honestly) and the server stops responding to any requests while the load
drops to ~ 0 ..

Ben

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
       [not found]             ` <1050187146.3931.12.camel@nexus6.musikcheck.dk>
@ 2003-04-12 22:51               ` Benjamin Podszun
  0 siblings, 0 replies; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 22:51 UTC (permalink / raw
  To: Hasse Hagen Johansen; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2004 bytes --]

Gentoo

*  dev-php/mod_php
      Latest version available: 4.3.1
      Latest version installed: 4.3.1

Debian

php4:
  Installed: 4:4.2.3-9


On Sun, 2003-04-13 at 00:39, Hasse Hagen Johansen wrote:
> Maybe I haven't seen all you messages, but what are your php4 version on
> gentoo vs. debian?
> 
> Hasse
> 
> 
> On Sun, 2003-04-13 at 00:35, Benjamin Podszun wrote:
> > On Sun, 2003-04-13 at 00:17, Brad Laue wrote:
> > > On Sat, 2003-04-12 at 17:46, Benjamin Podszun wrote:
> > > 
> > > > You upgraded to Apache2? I guess (hope?) that you don't talk about
> > > > production environments? I tried to use Apache2 with PHP twice and
> > > > wouldn't recommend it to anyone.. It's just buggy and not usable. As my
> > > > current Gentoo-Servers are.. *cough*
> > > 
> > > Hardware configuration? Amount of RAM? Number of CPU's? What specific
> > > revision of gentoo-sources? Have you tried vanilla-sources or alan cox's
> > > patchset? What configuration options had you given the Debian kernel and
> > > do they differ from those you gave to Gentoo's kernel?
> > 
> > Uhm.. I did post my hardware, but maybe it wasn't clear enough in all my
> > messages.
> > Compaq-Server, 2 1GHz CPUs, 2GB RAM, no special hardware, apart from
> > Smart Arrays..
> > Vanilla-sources 2.4.20
> > 
> > Debian:
> > vanilla 2.4.18, built with the "normal" way, no deb-package
> > 
> > > Have you tried 2.4.18 under Gentoo to see if it solves your problems?
> > 
> > Yes, no difference
> > 
> > > This isn't a matter of Debian working and Gentoo not working; there's a
> > > configuration difference between the two, that's all.
> > 
> > Yes, I don't doubt it. But I copied the php.ini, apache-config-files and
> > I don't see the difference. The only thing I see is that apache sucks up
> > to 99% CPU (I don't know if it was the same on the Debian system,
> > honestly) and the server stops responding to any requests while the load
> > drops to ~ 0 ..
> > 
> > Ben

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 22:25         ` Martin Schlemmer
@ 2003-04-12 22:55           ` Benjamin Podszun
  2003-04-12 23:30             ` Martin Schlemmer
  0 siblings, 1 reply; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-12 22:55 UTC (permalink / raw
  To: azarah; +Cc: Hasse Hagen Johansen, Gentoo-Dev


[-- Attachment #1.1: Type: text/plain, Size: 976 bytes --]

Attached.

On Sun, 2003-04-13 at 00:25, Martin Schlemmer wrote:
> On Sat, 2003-04-12 at 22:44, Benjamin Podszun wrote:
> > jay:~/apache-1.3.27/debian/patches# ls
> > ab_overzealous_connections     mime_type_fix
> > apxs_assumes_dso               mod_bandwidth_paths
> > apxs_wrong_prefix              phf_dot_log
> > custom_response_segfaults     
> > regex_must_conform_to_posix_for_LFS_to_work
> > dbm_part_2_the_revenge         server_subversioning
> > debian_config_layout           suexec_combined
> > debian_ps_is_brutal            suexec_of_death
> > debian_requires_fPIC           thetarget_unquoted
> > hurd_compile_fix_for_upstream  usr_bin_perl_owns_you
> > 
> > Uhm.. That's not really helpful for me... Any other ideas?
> > 
> 
> Could you attach patches:
> 
>   ab_overzealous_connections
>   mod_bandwidth_paths
>   suexec_combined
>   suexec_of_death
>   usr_bin_perl_owns_you
> 
> Although I do not think the last are related.  


[-- Attachment #1.2: ab_overzealous_connections --]
[-- Type: text/x-patch, Size: 414 bytes --]

diff -ruN build-tree/apache_1.3.27/src/support/ab.c build-tree/apache_1.3.26/src/support/ab.c
--- build-tree/apache_1.3.27/src/support/ab.c	Thu May 18 02:43:06 2000
+++ build-tree/apache_1.3.27/src/support/ab.c	Thu May 18 02:36:24 2000
@@ -602,7 +602,8 @@
     FD_CLR(c->fd, &writebits);
 
     /* connect again */
-    start_connect(c);
+    if(done < requests)
+	start_connect(c);
     return;
 }
 

[-- Attachment #1.3: mod_bandwidth_paths --]
[-- Type: text/plain, Size: 844 bytes --]

--- build-tree/apache-contrib-1.0.8/mod_bandwidth/mod_bandwidth.c	Fri Aug 20 01:59:02 1999
+++ build-tree/apache-contrib-1.0.8/mod_bandwidth/mod_bandwidth.c.mine	Tue Feb 19 21:28:01 2002
@@ -340,8 +340,8 @@
 #define MIN_BW_DEFAULT  256        /* Minimal bandwidth defaulted to 256Bps */
 #define PACKET 1024                /* Sent packet of 1024 bytes             */
 
-#define MASTER_DIR  "/tmp/apachebw/master"
-#define LINK_DIR    "/tmp/apachebw/link"
+#define MASTER_DIR  "/var/lib/apache/mod-bandwidth/master"
+#define LINK_DIR    "/var/lib/apache/mod-bandwidth/link"
 
 #ifdef USE_MMAP_FILES
 #include <unistd.h>
@@ -745,7 +745,7 @@
    * directory.
    */
 
-  if (stat(directory, &fdata) < -1) {
+  if (stat(directory, &fdata) < 0) {
      /* Dunno if this may happen... but well... */
      return DECLINED;
   }

[-- Attachment #1.4: suexec_combined --]
[-- Type: text/plain, Size: 12566 bytes --]

--- build-tree/apache_1.3.27/src/support/suexec.c	Thu Mar  8 11:11:43 2001
+++ build-tree/apache_1.3.27/src/support/suexec.c	Thu Jan 10 21:00:14 2002
@@ -90,6 +90,7 @@
 #include <sys/types.h>
 
 #include <stdarg.h>
+#include <strings.h>
 
 #include "suexec.h"
 
@@ -165,6 +166,8 @@
     "UNIQUE_ID",
     "USER_NAME",
     "TZ",
+    "HTTPS",
+    "REDIRECT_HTTPS",
     NULL
 };
 
@@ -228,7 +231,8 @@
     cidx++;
 
     for (ep = environ; *ep && cidx < AP_ENVBUF-1; ep++) {
-	if (!strncmp(*ep, "HTTP_", 5)) {
+	if (!strncmp(*ep, "HTTP_", 5) ||
+	    !strncmp(*ep, "SSL_", 4)) {
 	    cleanenv[cidx] = *ep;
 	    cidx++;
 	}
@@ -249,6 +253,244 @@
     environ = cleanenv;
 }
 
+#define MY_STATE_NORMAL 0
+#define MY_STATE_SPACE 1
+#define MY_STATE_QUOTES 2
+#define MY_STATE_APOSTROPHES 3
+#define MY_STATE_END 4
+
+char** param_separate(char* params, int addl_slots) {
+    int state, actpos, actarg_start, actarg_len, argnum;
+    char **res=0;
+    char backslash=0;
+    
+    if (params==0) return(0);
+    
+    if (*params==0) {
+       res=(char**)malloc(sizeof(char*)*(1+addl_slots));
+       for (actpos=0;actpos<addl_slots+1;++actpos) res[actpos]=0;
+       return(res);
+    }
+    actpos=0;backslash=0;argnum=0;state=MY_STATE_SPACE;
+    while (state!=MY_STATE_END) {
+       switch (state) {
+       
+          case MY_STATE_SPACE: 
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          break;
+                          
+                 case ' ' :
+                 case '\t':
+                          break;              
+       
+                 case '\'':
+                          state=MY_STATE_APOSTROPHES;
+                          actarg_start=actpos+1;
+                          break;
+                 case '"':
+                          state=MY_STATE_QUOTES;
+                          actarg_start=actpos+1;
+                          break;
+                 default: 
+                          state=MY_STATE_NORMAL;
+                          actarg_start=actpos;
+              }
+              break;
+                          
+          case MY_STATE_NORMAL:
+              
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          ++argnum;
+                          actarg_len=actpos-actarg_start;
+                          break;
+                          
+                 case ' ':
+                 case '\t':
+                          state=MY_STATE_SPACE;
+                          ++argnum;
+                          actarg_len=actpos-actarg_start;
+                          break; 
+              }
+              break;
+
+          case MY_STATE_APOSTROPHES:
+              
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          ++argnum;
+                          actarg_len=actpos-actarg_start;
+                          break;
+                 
+                 case '\\':
+                          backslash=1-backslash;        
+                          break;        
+                          
+                 case '\'':
+                          if (! backslash) {
+                             state=MY_STATE_SPACE;
+                             ++argnum;
+                             actarg_len=actpos-actarg_start;
+                          }
+                          break; 
+              }
+              if (params[actpos]!='\\') backslash=0;
+              break;
+          
+          case MY_STATE_QUOTES:
+              
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          ++argnum;
+                          actarg_len=actpos-actarg_start;
+                          break;
+                 
+                 case '\\':
+                          backslash=1-backslash;        
+                          break;        
+                          
+                 case '"':
+                          if (! backslash) {
+                             state=MY_STATE_SPACE;
+                             ++argnum;
+                             actarg_len=actpos-actarg_start;
+                          }
+                          break; 
+              }
+              if (params[actpos]!='\\') backslash=0;
+              break;
+       }
+       actpos++;
+    }
+    
+    res=(char**)malloc(sizeof(char*)*(argnum+1+addl_slots));
+    for (actpos=0;actpos<argnum+addl_slots+1;++actpos) res[actpos]=0;
+    
+
+    actpos=0;backslash=0;argnum=0;state=MY_STATE_SPACE;
+    while (state!=MY_STATE_END) {
+       switch (state) {
+       
+          case MY_STATE_SPACE: 
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          break;
+                          
+                 case ' ' :
+                 case '\t':
+                          break;              
+       
+                 case '\'':
+                          state=MY_STATE_APOSTROPHES;
+                          actarg_start=actpos+1;
+                          break;
+                 case '"':
+                          state=MY_STATE_QUOTES;
+                          actarg_start=actpos+1;
+                          break;
+                 default: 
+                          state=MY_STATE_NORMAL;
+                          actarg_start=actpos;
+              }
+              break;
+                          
+          case MY_STATE_NORMAL:
+              
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          actarg_len=actpos-actarg_start;
+                          res[argnum]=(char*)malloc(actarg_len+1);
+                          strncpy(res[argnum],&params[actarg_start],actarg_len);
+                          res[argnum][actarg_len]=0;
+                          ++argnum;
+                          break;
+                          
+                 case ' ':
+                 case '\t':
+                          state=MY_STATE_SPACE;
+                          actarg_len=actpos-actarg_start;
+                          res[argnum]=(char*)malloc(actarg_len+1);
+                          strncpy(res[argnum],&params[actarg_start],actarg_len);
+                          res[argnum][actarg_len]=0;
+                          ++argnum;
+                          break; 
+              }
+              break;
+
+          case MY_STATE_APOSTROPHES:
+              
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          actarg_len=actpos-actarg_start;
+                          res[argnum]=(char*)malloc(actarg_len+1);
+                          strncpy(res[argnum],&params[actarg_start],actarg_len);
+                          res[argnum][actarg_len]=0;
+                          ++argnum;
+                          break;
+                 
+                 case '\\':
+                          backslash=1-backslash;        
+                          break;        
+                          
+                 case '\'':
+                          if (! backslash) {
+                             state=MY_STATE_SPACE;
+                             actarg_len=actpos-actarg_start;
+                             res[argnum]=(char*)malloc(actarg_len+1);
+                             strncpy(res[argnum],&params[actarg_start],actarg_len);
+                             res[argnum][actarg_len]=0;
+                             ++argnum;
+                          }
+                          break; 
+              }
+              if (params[actpos]!='\\') backslash=0;
+              break;
+          
+          case MY_STATE_QUOTES:
+              
+              switch (params[actpos]) {
+                 case 0 : 
+                          state=MY_STATE_END;
+                          actarg_len=actpos-actarg_start;
+                          res[argnum]=(char*)malloc(actarg_len+1);
+                          strncpy(res[argnum],&params[actarg_start],actarg_len);
+                          res[argnum][actarg_len]=0;
+                          ++argnum;
+                          break;
+                 
+                 case '\\':
+                          backslash=1-backslash;        
+                          break;        
+                          
+                 case '"':
+                          if (! backslash) {
+                             state=MY_STATE_SPACE;
+                             actarg_len=actpos-actarg_start;
+                             res[argnum]=(char*)malloc(actarg_len+1);
+                             strncpy(res[argnum],&params[actarg_start],actarg_len);
+                             res[argnum][actarg_len]=0;
+                             ++argnum;
+                          }
+                          break; 
+              }
+              if (params[actpos]!='\\') backslash=0;
+              break;
+       }
+       actpos++;
+    }
+
+    return(res);
+}    
+
+
 int main(int argc, char *argv[])
 {
     int userdir = 0;		/* ~userdir flag             */
@@ -261,6 +503,10 @@
     char *actual_gname;		/* actual group name         */
     char *prog;			/* name of this program      */
     char *cmd;			/* command to be executed    */
+
+    int ind, ind2;    
+    char **passedargv = 0;
+    
     char cwd[AP_MAXPATH];	/* current working directory */
     char dwd[AP_MAXPATH];	/* docroot working directory */
     struct passwd *pw;		/* password entry holder     */
@@ -534,8 +780,18 @@
     /*
      * Error out if we cannot stat the program.
      */
-    if (((lstat(cmd, &prg_info)) != 0) || (S_ISLNK(prg_info.st_mode))) {
-	log_err("error: cannot stat program: (%s)\n", cmd);
+    passedargv=param_separate(cmd,argc-4);
+    for (ind=0; passedargv[ind]; ++ind);
+    for (ind2=4;ind2<argc;++ind2,++ind) {
+        if (argv[ind2]!=0) if (argv[ind2][0]!=0) passedargv[ind]=strdup(argv[ind2]);
+        if (passedargv[ind]==0) {
+            passedargv[ind]=malloc(1);
+            passedargv[ind][0]=0;
+        }
+    }
+    
+    if (((lstat(passedargv[0], &prg_info)) != 0) || (S_ISLNK(prg_info.st_mode))) {
+	log_err("error: cannot stat program: (%s)\n", passedargv[0]);
 	exit(117);
     }
 
@@ -543,7 +799,7 @@
      * Error out if the program is writable by others.
      */
     if ((prg_info.st_mode & S_IWOTH) || (prg_info.st_mode & S_IWGRP)) {
-	log_err("error: file is writable by others: (%s/%s)\n", cwd, cmd);
+	log_err("error: file is writable by others: (%s/%s)\n", cwd, passedargv[0]);
 	exit(118);
     }
 
@@ -551,7 +807,7 @@
      * Error out if the file is setuid or setgid.
      */
     if ((prg_info.st_mode & S_ISUID) || (prg_info.st_mode & S_ISGID)) {
-	log_err("error: file is either setuid or setgid: (%s/%s)\n", cwd, cmd);
+	log_err("error: file is either setuid or setgid: (%s/%s)\n", cwd, passedargv[0]);
 	exit(119);
     }
 
@@ -576,7 +832,7 @@
      * "[error] Premature end of script headers: ..."
      */
     if (!(prg_info.st_mode & S_IXUSR)) {
-	log_err("error: file has no execute permission: (%s/%s)\n", cwd, cmd);
+	log_err("error: file has no execute permission: (%s/%s)\n", cwd, passedargv[0]);
 	exit(121);
     }
 
@@ -609,6 +865,8 @@
     /*
      * Execute the command, replacing our image with its own.
      */
+    execv(passedargv[0], passedargv);
+#if 0
 #ifdef NEED_HASHBANG_EMUL
     /* We need the #! emulation when we want to execute scripts */
     {
@@ -619,7 +877,7 @@
 #else /*NEED_HASHBANG_EMUL*/
     execv(cmd, &argv[3]);
 #endif /*NEED_HASHBANG_EMUL*/
-
+#endif
     /*
      * (I can't help myself...sorry.)
      *
@@ -629,5 +887,10 @@
      * Oh well, log the failure and error out.
      */
     log_err("emerg: (%d)%s: exec failed (%s)\n", errno, strerror(errno), cmd);
+
+    for (ind=0;passedargv[ind];++ind) free(passedargv[ind]);
+    free(passedargv);
+    passedargv=0;
+
     exit(255);
 }

[-- Attachment #1.5: suexec_of_death --]
[-- Type: text/plain, Size: 714 bytes --]

--- build-tree/apache_1.3.27/src/main/http_core.c
+++ build-tree/apache_1.3.27/src/main/http_core.c
@@ -1892,8 +1892,9 @@
 	else {
 	    cmd->server->server_uid = ap_user_id;
 	    fprintf(stderr,
-		    "Warning: User directive in <VirtualHost> "
+		    "ERROR: User directive in <VirtualHost> "
 		    "requires SUEXEC wrapper.\n");
+	    exit (1);
 	}
     }
 #if !defined (BIG_SECURITY_HOLE) && !defined (OS2)
@@ -1933,8 +1934,9 @@
 	else {
 	    cmd->server->server_gid = ap_group_id;
 	    fprintf(stderr,
-		    "Warning: Group directive in <VirtualHost> requires "
+		    "ERROR: Group directive in <VirtualHost> requires "
 		    "SUEXEC wrapper.\n");
+	    exit (1);
 	}
     }
 

[-- Attachment #1.6: usr_bin_perl_owns_you --]
[-- Type: text/x-patch, Size: 2626 bytes --]

diff --minimal --new-file --recursive --show-c-function --unified=3 apache_1.3.12.old/cgi-bin/printenv apache_1.3.12/cgi-bin/printenv
--- build-tree/apache_1.3.27/cgi-bin/printenv	Wed Nov 24 12:10:58 1999
+++ build-tree/apache_1.3.27/cgi-bin/printenv	Sun Apr 16 09:50:04 2000
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 ##
 ##  printenv -- demo CGI program which just prints its environment
 ##
diff --minimal --new-file --recursive --show-c-function --unified=3 apache_1.3.12.old/cgi-bin/printenv.~1~ apache_1.3.12/cgi-bin/printenv.~1~
--- build-tree/apache_1.3.27/cgi-bin/printenv.~1~	Wed Dec 31 18:00:00 1969
+++ build-tree/apache_1.3.27/cgi-bin/printenv.~1~	Sun Apr 16 09:49:43 2000
@@ -0,0 +1,13 @@
+#!/usr/local/bin/perl
+##
+##  printenv -- demo CGI program which just prints its environment
+##
+
+print "Content-type: text/plain\n\n";
+foreach $var (sort(keys(%ENV))) {
+    $val = $ENV{$var};
+    $val =~ s|\n|\\n|g;
+    $val =~ s|"|\\"|g;
+    print "${var}=\"${val}\"\n";
+}
+
diff --minimal --new-file --recursive --show-c-function --unified=3 apache_1.3.12.old/src/support/dbmmanage apache_1.3.12/src/support/dbmmanage
--- build-tree/apache_1.3.27/src/support/dbmmanage	Sun Nov 28 07:37:53 1999
+++ build-tree/apache_1.3.27/src/support/dbmmanage	Sun Apr 16 09:49:43 2000
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 
 # ====================================================================
 # Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
diff --minimal --new-file --recursive --show-c-function --unified=3 apache_1.3.12.old/src/support/log_server_status apache_1.3.12/src/support/log_server_status
--- build-tree/apache_1.3.27/src/support/log_server_status	Fri Jun  4 10:54:19 1999
+++ build-tree/apache_1.3.27/src/support/log_server_status	Sun Apr 16 09:49:43 2000
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 
 # ====================================================================
 # Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
diff --minimal --new-file --recursive --show-c-function --unified=3 apache_1.3.12.old/src/support/phf_abuse_log.cgi apache_1.3.12/src/support/phf_abuse_log.cgi
--- build-tree/apache_1.3.27/src/support/phf_abuse_log.cgi	Tue Oct  8 16:14:49 1996
+++ build-tree/apache_1.3.27/src/support/phf_abuse_log.cgi	Sun Apr 16 09:49:43 2000
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 
 # This script can be used to detect people trying to abuse the security hole which
 # existed in A CGI script direstributed with Apache 1.0.3 and earlier versions.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 22:55           ` Benjamin Podszun
@ 2003-04-12 23:30             ` Martin Schlemmer
  2003-04-13 15:46               ` Benjamin Podszun
  0 siblings, 1 reply; 27+ messages in thread
From: Martin Schlemmer @ 2003-04-12 23:30 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: Hasse Hagen Johansen, Gentoo-Dev

[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]

On Sun, 2003-04-13 at 00:55, Benjamin Podszun wrote:
> Attached.
> 
> On Sun, 2003-04-13 at 00:25, Martin Schlemmer wrote:
> > On Sat, 2003-04-12 at 22:44, Benjamin Podszun wrote:
> > > jay:~/apache-1.3.27/debian/patches# ls
> > > ab_overzealous_connections     mime_type_fix
> > > apxs_assumes_dso               mod_bandwidth_paths
> > > apxs_wrong_prefix              phf_dot_log
> > > custom_response_segfaults     
> > > regex_must_conform_to_posix_for_LFS_to_work
> > > dbm_part_2_the_revenge         server_subversioning
> > > debian_config_layout           suexec_combined
> > > debian_ps_is_brutal            suexec_of_death
> > > debian_requires_fPIC           thetarget_unquoted
> > > hurd_compile_fix_for_upstream  usr_bin_perl_owns_you
> > > 
> > > Uhm.. That's not really helpful for me... Any other ideas?
> > > 
> > 
> > Could you attach patches:
> > 
> >   ab_overzealous_connections
> >   mod_bandwidth_paths
> >   suexec_combined
> >   suexec_of_death
> >   usr_bin_perl_owns_you
> > 
> > Although I do not think the last are related.  

Mind applying the ab_overzealous_connections patch, and
see if that makes a difference ?  If you have issues
to get it applied, let me know (although I am going to
bed now =)


Regards,

-- 

Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 22:35           ` Benjamin Podszun
       [not found]             ` <1050187146.3931.12.camel@nexus6.musikcheck.dk>
@ 2003-04-13  0:22             ` Brad Laue
  1 sibling, 0 replies; 27+ messages in thread
From: Brad Laue @ 2003-04-13  0:22 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: gentoo-dev

On Sat, 2003-04-12 at 18:35, Benjamin Podszun wrote:

> Yes, I don't doubt it. But I copied the php.ini, apache-config-files and
> I don't see the difference. The only thing I see is that apache sucks up
> to 99% CPU (I don't know if it was the same on the Debian system,
> honestly) and the server stops responding to any requests while the load
> drops to ~ 0 ..
> 
> Ben

PHP is a major troublemaker; I've had it cause the same situations with
apache from Linux to FreeBSD and beyond; I'm not familiar with the
compile-time options Debian provides for the mod_php .debs; are you
using default USE flags or paring down PHP with them so that it only
includes those additions you require?

Maybe that will help.

The thread has become huge, apologies if I'm making this suggestion a
second time :P

Brad

--
// -- http://www.BRAD-X.com/ -- //


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 23:30             ` Martin Schlemmer
@ 2003-04-13 15:46               ` Benjamin Podszun
  2003-04-13 18:11                 ` Martin Schlemmer
  0 siblings, 1 reply; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-13 15:46 UTC (permalink / raw
  To: azarah; +Cc: Hasse Hagen Johansen, Gentoo-Dev

[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]

I applied it and had no problems so far with it. But I changed a lot of
other things as well (disabled lots of non-critical apache-modules,
tried to tweak the php.ini etc.), so I'm not sure if the patch solved my
problem or if it's solved at.

On Sun, 2003-04-13 at 01:30, Martin Schlemmer wrote:
> On Sun, 2003-04-13 at 00:55, Benjamin Podszun wrote:
> > Attached.
> > 
> > On Sun, 2003-04-13 at 00:25, Martin Schlemmer wrote:
> > > On Sat, 2003-04-12 at 22:44, Benjamin Podszun wrote:
> > > > jay:~/apache-1.3.27/debian/patches# ls
> > > > ab_overzealous_connections     mime_type_fix
> > > > apxs_assumes_dso               mod_bandwidth_paths
> > > > apxs_wrong_prefix              phf_dot_log
> > > > custom_response_segfaults     
> > > > regex_must_conform_to_posix_for_LFS_to_work
> > > > dbm_part_2_the_revenge         server_subversioning
> > > > debian_config_layout           suexec_combined
> > > > debian_ps_is_brutal            suexec_of_death
> > > > debian_requires_fPIC           thetarget_unquoted
> > > > hurd_compile_fix_for_upstream  usr_bin_perl_owns_you
> > > > 
> > > > Uhm.. That's not really helpful for me... Any other ideas?
> > > > 
> > > 
> > > Could you attach patches:
> > > 
> > >   ab_overzealous_connections
> > >   mod_bandwidth_paths
> > >   suexec_combined
> > >   suexec_of_death
> > >   usr_bin_perl_owns_you
> > > 
> > > Although I do not think the last are related.  
> 
> Mind applying the ab_overzealous_connections patch, and
> see if that makes a difference ?  If you have issues
> to get it applied, let me know (although I am going to
> bed now =)
> 
> 
> Regards,

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-13 15:46               ` Benjamin Podszun
@ 2003-04-13 18:11                 ` Martin Schlemmer
  2003-04-13 21:20                   ` Benjamin Podszun
  0 siblings, 1 reply; 27+ messages in thread
From: Martin Schlemmer @ 2003-04-13 18:11 UTC (permalink / raw
  To: Benjamin Podszun; +Cc: Hasse Hagen Johansen, Gentoo-Dev

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On Sun, 2003-04-13 at 17:46, Benjamin Podszun wrote:
> I applied it and had no problems so far with it. But I changed a lot of
> other things as well (disabled lots of non-critical apache-modules,
> tried to tweak the php.ini etc.), so I'm not sure if the patch solved my
> problem or if it's solved at.
> 

If possible, could you verify if it was that, then we can get the
apache maintainer to add it ?


Regards,

-- 

Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-13 18:11                 ` Martin Schlemmer
@ 2003-04-13 21:20                   ` Benjamin Podszun
  0 siblings, 0 replies; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-13 21:20 UTC (permalink / raw
  To: Hasse Hagen Johansen, Gentoo-Dev


[-- Attachment #1.1: Type: text/plain, Size: 746 bytes --]

On Sun, 2003-04-13 at 20:11, Martin Schlemmer wrote:
> On Sun, 2003-04-13 at 17:46, Benjamin Podszun wrote:
> > I applied it and had no problems so far with it. But I changed a lot of
> > other things as well (disabled lots of non-critical apache-modules,
> > tried to tweak the php.ini etc.), so I'm not sure if the patch solved my
> > problem or if it's solved at.
> > 
> 
> If possible, could you verify if it was that, then we can get the
> apache maintainer to add it ?

[ Forgot to reply to all, just wrote to azarah some minutes ago ]

No, got the same problem right now. I attached some infos from my
apache/php - error-log. As you can see the server stopped working after
~ 8 hours of work.. I'm really helpless here..


[-- Attachment #1.2: weird.txt --]
[-- Type: text/plain, Size: 4851 bytes --]

[Sun Apr 13 14:34:50 2003] [alert] apache: Could not determine the server's fully qualified domain name, using 194.97.52.180 for ServerName
[Sun Apr 13 14:34:50 2003] [notice-phpa] Acquiring cache : uid 81 gid 81 perms 666 (pid 23308)
[Sun Apr 13 14:34:50 2003] [notice-phpa] PHPA 1.3.3r2 on linux_i686_glibc2.1.3 (pid 23308)
[Sun Apr 13 14:34:50 2003] [notice-phpa] Initialised 32MB cache at 0x40a11000 with 512 process entries (pid 23308)
[Sun Apr 13 14:34:50 2003] [notice-phpa] Lock thresholds 10/10 (pid 23308)
[Sun Apr 13 14:34:50 2003] [notice] Apache/1.3.27 (Unix)  (Gentoo/Linux) PHP/4.3.1 mod_gzip/1.3.19.1a configured -- resuming normal operations
[Sun Apr 13 14:34:50 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Apr 13 14:34:50 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sun Apr 13 14:39:21 2003] [error] [client 61.13.51.59] script not found or unable to stat: /var/www/cgi-bin/..%5c..%5c..%5c..%5c..%5c..%5cwinnt
[Sun Apr 13 14:39:22 2003] [error] [client 61.13.51.59] script not found or unable to stat: /var/www/cgi-bin/..À¯..À¯..À¯..À¯..À¯..
[Sun Apr 13 14:44:33 2003] [error] PHP Warning:  file(http://grafik.galactic-tales.de/gtgfx/ships/) [<a href='http://www.php.net/function.file'>function.file</a>]: failed to create stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /var/www/gt-www/1/clanstation/ship_choose.php on line 31
[Sun Apr 13 14:44:33 2003] [error] PHP Warning:  Variable passed to each() is not an array or object in /var/www/gt-www/1/clanstation/ship_choose.php on line 33
[Sun Apr 13 16:07:24 2003] [error] PHP Warning:  current() [<a href='http://www.php.net/function.current'>function.current</a>]: Passed variable is not an array or object in /var/www/gt-www/nntp2web/article.php on line 86
[Sun Apr 13 16:07:24 2003] [error] PHP Warning:  next() [<a href='http://www.php.net/function.next'>function.next</a>]: Passed variable is not an array or object in /var/www/gt-www/nntp2web/article.php on line 91
[Sun Apr 13 16:07:24 2003] [error] PHP Warning:  reset() [<a href='http://www.php.net/function.reset'>function.reset</a>]: Passed variable is not an array or object in /var/www/gt-www/nntp2web/article.php on line 93
[Sun Apr 13 16:07:24 2003] [error] PHP Warning:  reset() [<a href='http://www.php.net/function.reset'>function.reset</a>]: Passed variable is not an array or object in /var/www/gt-www/nntp2web/article.php on line 145
[Sun Apr 13 16:07:24 2003] [error] PHP Warning:  current() [<a href='http://www.php.net/function.current'>function.current</a>]: Passed variable is not an array or object in /var/www/gt-www/nntp2web/article.php on line 148
[Sun Apr 13 16:07:24 2003] [error] PHP Warning:  next() [<a href='http://www.php.net/function.next'>function.next</a>]: Passed variable is not an array or object in /var/www/gt-www/nntp2web/article.php on line 168
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 289473.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 1.
[Sun Apr 13 18:55:12 2003] [error] PHP Warning:  file(http://grafik.galactic-tales.de/gtgfx/ships/) [<a href='http://www.php.net/function.file'>function.file</a>]: failed to create stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /var/www/gt-www/1/clanstation/ship_choose.php on line 31
[Sun Apr 13 18:55:12 2003] [error] PHP Warning:  Variable passed to each() is not an array or object in /var/www/gt-www/1/clanstation/ship_choose.php on line 33
[Sun Apr 13 20:18:27 2003] [error] server reached MaxClients setting, consider raising the MaxClients setting
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 301483.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 31.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 304.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 15.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 47.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 38.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 74.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 26.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 50.
Modification of a read-only value attempted at /usr/lib/perl5/5.8.0/i686-linux/Sys/Syslog.pm line 296, <> line 470.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-12 19:09 [gentoo-dev] Performance once again Benjamin Podszun
  2003-04-12 19:13 ` Jon Portnoy
  2003-04-12 20:24 ` Brian Jackson
@ 2003-04-14  8:51 ` Václav Hůla
  2003-04-14  9:03   ` Benjamin Podszun
  2 siblings, 1 reply; 27+ messages in thread
From: Václav Hůla @ 2003-04-14  8:51 UTC (permalink / raw
  To: gentoo-dev

On Saturday 12 of April 2003 21:09, Benjamin Podszun wrote:
> Hi there.
> I switched to Gentoo on two of my servers recently. Before that I used
> Debian stable with a 2.4.18-Kernel.
> Right now the machines are nearly useless. They should serve lots of
> pages, but every ~24h everything freezes without any load on the
> machines.. The load drops to 0.01 and nothing is delivered.
> Only a restart of apache resets this timeframe again.

Have you tried to strace the apache? Somewhere in this post you wrote 
something about one process eating lots of CPU, so maybe strace output of 
this process may be helpful.

Ax
-- 
S pozdravem
Vaclav Hula	                                 vaclav.hula@capitol.cz
Capitol Internet Publisher, Korunovacni 6, 170 00 Prague 7, Czech Republic
tel.: ++420 2 3337 1113, fax:  ++420 2 3337 1112



--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-14  8:51 ` Václav Hůla
@ 2003-04-14  9:03   ` Benjamin Podszun
  2003-04-14  9:33     ` Paul de Vrieze
  0 siblings, 1 reply; 27+ messages in thread
From: Benjamin Podszun @ 2003-04-14  9:03 UTC (permalink / raw
  To: vaclav.hula; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

On Mon, 2003-04-14 at 10:51, Václav Hůla wrote:
> On Saturday 12 of April 2003 21:09, Benjamin Podszun wrote:
> > Hi there.
> > I switched to Gentoo on two of my servers recently. Before that I used
> > Debian stable with a 2.4.18-Kernel.
> > Right now the machines are nearly useless. They should serve lots of
> > pages, but every ~24h everything freezes without any load on the
> > machines.. The load drops to 0.01 and nothing is delivered.
> > Only a restart of apache resets this timeframe again.
> 
> Have you tried to strace the apache? Somewhere in this post you wrote 
> something about one process eating lots of CPU, so maybe strace output of 
> this process may be helpful.

No, not yet.
I could try to run strace on apache, but the biggest problem is not the
CPU it uses.. The problem is that it just stops to work. Yesterday I got
a "MaxClients reached" error and MaxClients is 200.. After that it 
didn't "recover" so I had to restart it before any new connections were
possible. Since that happened 8h after I started the server again, I
doubt that I can strace this particular problem? Or do I miss something?

thx,
Ben

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-14  9:03   ` Benjamin Podszun
@ 2003-04-14  9:33     ` Paul de Vrieze
  2003-04-14 12:30       ` Dar-Klajid
  0 siblings, 1 reply; 27+ messages in thread
From: Paul de Vrieze @ 2003-04-14  9:33 UTC (permalink / raw
  To: gentoo-dev

>
> No, not yet.
> I could try to run strace on apache, but the biggest problem is not the
> CPU it uses.. The problem is that it just stops to work. Yesterday I got
> a "MaxClients reached" error and MaxClients is 200.. After that it
> didn't "recover" so I had to restart it before any new connections were
> possible. Since that happened 8h after I started the server again, I
> doubt that I can strace this particular problem? Or do I miss something?

Do you by any chance use persistent database connections from php. In that
case you might want to look at setting a limit on those connections, or
maybe disallow (or remove the use) them. Also fiddling with the apache
client settings might work. 200 clients is a lot, so probably some are out
on their backs (dead). In the config you can control restarting of those
clients (how long they are allowed to be alive). If you have a really busy
site, they might actually all be in use in which case increasing this
limit is the solution.

Good luck,
Paul

-- 
Paul de Vrieze
Researcher
Mail: pauldv@cs.kun.nl
Homepage: http://www.devrieze.net




--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [gentoo-dev] Performance once again..
  2003-04-14  9:33     ` Paul de Vrieze
@ 2003-04-14 12:30       ` Dar-Klajid
  0 siblings, 0 replies; 27+ messages in thread
From: Dar-Klajid @ 2003-04-14 12:30 UTC (permalink / raw
  To: Paul de Vrieze; +Cc: gentoo-dev

On Mon, 2003-04-14 at 11:33, Paul de Vrieze wrote:
> >
> > No, not yet.
> > I could try to run strace on apache, but the biggest problem is not the
> > CPU it uses.. The problem is that it just stops to work. Yesterday I got
> > a "MaxClients reached" error and MaxClients is 200.. After that it
> > didn't "recover" so I had to restart it before any new connections were
> > possible. Since that happened 8h after I started the server again, I
> > doubt that I can strace this particular problem? Or do I miss something?
> 
> Do you by any chance use persistent database connections from php. In that
> case you might want to look at setting a limit on those connections, or
> maybe disallow (or remove the use) them. Also fiddling with the apache
> client settings might work. 200 clients is a lot, so probably some are out
> on their backs (dead). In the config you can control restarting of those
> clients (how long they are allowed to be alive). If you have a really busy
> site, they might actually all be in use in which case increasing this
> limit is the solution.

Thanks for the reply, but I already checked all that. No, I don't use
persistant connections. I do use a lot of DB-connections, but after this
"incident" the server won't serve php-sites anymore and therefor there
are no connections on the DB (I checked that on the DB-Server).
I'm still not sure what causes this Perl-Error in the error_log
(Syslog).
I log via a custom logger-script (more or less a perl-oneliner) and some
of the lines are send to another host.
I used exactly the same configuration/script with Debian before, but
Debian uses sysklogd and I switched to syslog-ng during my
"distribution-move".
Could this be a problem? I'm just guessing here, since I'm totally
helpless right now.

Concerning the other apache settings:
Timeout 180
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 15
StartServers 10
MaxClients 200
MaxRequestsPerChild 500

Anything wrong with this settings? I'm quite sure that I copied them one
by one from the Debian config.


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2003-04-14 12:31 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-12 19:09 [gentoo-dev] Performance once again Benjamin Podszun
2003-04-12 19:13 ` Jon Portnoy
2003-04-12 19:44   ` Benjamin Podszun
2003-04-12 19:54     ` Jon Portnoy
2003-04-12 20:24 ` Brian Jackson
2003-04-12 20:32   ` Benjamin Podszun
2003-04-12 20:38     ` Hasse Hagen Johansen
2003-04-12 20:44       ` Benjamin Podszun
2003-04-12 22:25         ` Martin Schlemmer
2003-04-12 22:55           ` Benjamin Podszun
2003-04-12 23:30             ` Martin Schlemmer
2003-04-13 15:46               ` Benjamin Podszun
2003-04-13 18:11                 ` Martin Schlemmer
2003-04-13 21:20                   ` Benjamin Podszun
2003-04-12 20:45     ` Robin H.Johnson
2003-04-12 21:46       ` Benjamin Podszun
2003-04-12 22:05         ` leahcim
2003-04-12 22:09         ` Robin H.Johnson
2003-04-12 22:17         ` Brad Laue
2003-04-12 22:35           ` Benjamin Podszun
     [not found]             ` <1050187146.3931.12.camel@nexus6.musikcheck.dk>
2003-04-12 22:51               ` Benjamin Podszun
2003-04-13  0:22             ` Brad Laue
2003-04-12 22:32         ` Terje Kvernes
2003-04-14  8:51 ` Václav Hůla
2003-04-14  9:03   ` Benjamin Podszun
2003-04-14  9:33     ` Paul de Vrieze
2003-04-14 12:30       ` Dar-Klajid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox