RE: [EMAIL PROTECTED] lower cpu priority to perl scripts

2008-08-27 Thread Tamer Embaby
Audio,

You can always start your scripts with [re]nice() syscall to lower
your process (perl script in this case) priority.

Regards,
Tamer

-Original Message-
From: Audio Phile [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2008 8:57 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] lower cpu priority to perl scripts

I'd like to adjust the priority of /usr/bin/perl such that it will always run 
with very low priority.  The PC that I'm using isn't very powerful.  I'm 
running rrdweather on it and when a user hits the weather.cgi about 10 
processes of perl scripts run,
which totally throttles foreground applications until they finish.

How can I assign /usr/bin/perl to always run with a really low CPU priority (a 
really high nice value) for any script it executes? Is this an apache2 setting 
or...?





-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Suexec - VhostAlias. Is it possible?

2008-08-27 Thread WhoAmI

Hi Guys,

I have a "little" problem: my server is running whit mod_vhost_alias and
mod_fastcgi (i only use it whit php5-cgi). I Use it whit VirtualScriptAlias
directive so i haven't to restart the webserver every time i add an user
(of course i haven't any vhost).

For security reasons i MUST use Suexec, and the only way to use Suexec is
to set the SuexecUserGroup directive. This means that i have to use
VirtualHosts and do a graceful every time. I've about 6000 users on that
webserver and i think that's not the best solution.

So, the problem is: how can i set a "global" SuexecUserGroup? Maybe that
SuexecUserGroup $(USER) $(GROUP) works fine? (CGI scripts have to run whit
their owner, i don't need any strange service).

Thanks

PS: sorry for my bad English, i'm an italian student :)
--
-WhoAmI-

Email: [EMAIL PROTECTED]
WebSite: http://www.autistici.org/whoami/


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache2 rewrite_log_lock

2008-08-27 Thread Sam Wootton
Hi,

Thank you for the reply, much appreciated.

The permissions in the /apache/logs directory are all

-rw-rw-r--

however, in my attempt (temporarily) to get things working, i did chmod 777
on all directories - and this still didn't work (i got the rewrite lock
error still).

The reason why i am losing my patience with this problem, is that the error
msg appears fairly self explanatory (in that apache appears not to have the
correct permissions), but i cannot fix it.

Regards, Sam Wootton

2008/8/27 Ron Savage <[EMAIL PROTECTED]>

> Hi Sam
>
>
> > When i attempt to start apache, i get the following in the access log:
> >
> > crit (14)Bad address: mod_rewrite: Could not set permissions on
> > rewrite_log_lock; check User and Group directives Configuration Failed
> >
> > I have the user and group directives set correctly in httpd.conf (an
> > Administrative user - the same as i had them in apache 1.3). I have
> > also tried setting:
> >
> > RewriteLog "/Library/Apache2/logs/
> > rewrite.log"
> > RewriteLogLevel 0
>
> Did you check the permissions on /all/ directories in that path?
>
> --
> Ron Savage
> [EMAIL PROTECTED]
> http://savage.net.au/index.html
>
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [EMAIL PROTECTED] too many open files

2008-08-27 Thread Arnab Ganguly
Hi Michael,
Did you tried the following "ulimit -S -n `ulimit -H -n` ?
This will assign the max open file hard limits value to your soft limit.
Can you check the output of ulimit -H -n and ulimit -S -n?Former gives your
hard and the latter gives your soft limits respectively.
Even if the above step is giving problem then increase the hard limit to max
value as per ur system should be something like 99.So put this value to
ur soft limit by the above procedure in the apachectl script and try out.You
print the value of ulimit -S -n in you apachectl script just to make sure
the change is taking place.Make sure the shell which runs the apachectl gets
the incremented FDS.
Thanks
Arnab

On Wed, Aug 27, 2008 at 12:40 AM, Michael Sutter
<[EMAIL PROTECTED]>wrote:

>  Hello Arnab,
>
> sorry for answering so late, but it took some time to test it.
> At the beginning of the apachectl script I put
> ulimit -n 5
> and restarted the daemon with the apachectl script.
>
> Nevertheless, it don't changed the behavior. The service
> was running for about  7 - 8 hours and after that I error
> message.
>
> Maybe you have another hint for me?
>
> Kind regards
> Michael
>
> Arnab Ganguly wrote:
>
> Can you try assigning the soft limit value to hard limit value and restart
> the server.You can put this in apachectl script so that it gets affected for
> the shell used for Apache.
> Thanks
> Arnab
>
> On Mon, Aug 25, 2008 at 6:47 PM, Michael Sutter <[EMAIL PROTECTED]
> > wrote:
>
>> Hello list,
>>
>> I have a strange problem with my httpd daemon and hopefully somebody can
>> help me.
>> I'm running a Apache 2.0.49 on a Suse 9.1 and have the mod_axis2 deployed.
>> Inside
>> Axis2 I'm running a service which is queried every ten seconds.
>>
>> After running for some hours, sometimes 2, sometimes 4, sometimes more I
>> always got
>> a exception: Too many open files. The exception is not written to the
>> error log, it is the
>> return value of my service. I also have no entry at the corresponding time
>> in my access.log,
>> so I think it is thrown before the service is accessed.
>>
>> I searched through the list and found, that normally the solution is  to
>> increase the limit
>> of open files. So I added in /etc/security/limits.conf
>> *  softnofile  8192
>> *  hardnofile  5
>> logged out and in again.
>>
>> For my understanding this should increase the number of open files for
>> every user.
>> Nevertheless, this don't changed the behaviour. I always got the
>> exception. So I also
>> added ulimit -n 8192 to my init script, which shows the same behaviour.
>>
>> I also monitored the number of open files on the system. It is always
>> about 2000 - much
>> less then I have declared in the configuration. The httpd daemon normally
>> has 10 process
>> and every process has opened about 90 - 95 files. So I'm also not on the
>> configured limit.
>>
>> Has anybody some idea what I'm doing wrong or how I can solve the problem?
>>
>> Kind regards
>> Michael
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  "   from the digest: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: [EMAIL PROTECTED] Apache2 rewrite_log_lock

2008-08-27 Thread WhoAmI

Hi,

is the owner of that directories the same user thet you have set in "User"
and "Group" (apache2.conf)?


On Wed, 27 Aug 2008 09:30:45 +0100, "Sam Wootton" <[EMAIL PROTECTED]>
wrote:
> Hi,
> 
> Thank you for the reply, much appreciated.
> 
> The permissions in the /apache/logs directory are all
> 
> -rw-rw-r--
> 
> however, in my attempt (temporarily) to get things working, i did chmod
> 777
> on all directories - and this still didn't work (i got the rewrite lock
> error still).
> 
> The reason why i am losing my patience with this problem, is that the
> error
> msg appears fairly self explanatory (in that apache appears not to have
> the
> correct permissions), but i cannot fix it.
> 
> Regards, Sam Wootton
> 
> 2008/8/27 Ron Savage <[EMAIL PROTECTED]>
> 
>> Hi Sam
>>
>>
>> > When i attempt to start apache, i get the following in the access log:
>> >
>> > crit (14)Bad address: mod_rewrite: Could not set permissions on
>> > rewrite_log_lock; check User and Group directives Configuration Failed
>> >
>> > I have the user and group directives set correctly in httpd.conf (an
>> > Administrative user - the same as i had them in apache 1.3). I have
>> > also tried setting:
>> >
>> > RewriteLog "/Library/Apache2/logs/
>> > rewrite.log"
>> > RewriteLogLevel 0
>>
>> Did you check the permissions on /all/ directories in that path?
>>
>> --
>> Ron Savage
>> [EMAIL PROTECTED]
>> http://savage.net.au/index.html
>>
>>
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server
> Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>   "   from the digest: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
-- 
-WhoAmI-

Email: [EMAIL PROTECTED]
WebSite: http://www.autistici.org/whoami/


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache2 rewrite_log_lock

2008-08-27 Thread Sam Wootton
Hi,

Yeap, in the conf/httpd.conf, i have:

User snapple
Group admin

This is the gourp i had in my old apache 1.3 set up.

This is my admin user for my machine, and the user i used when isntalling
apache2.

This is the odd thing, its all the same set up as my old apache, fairly
simple stuff - just doesn't work. I am worried its darwin kernal / apache2
compatibility problem - but have been reassured on a few forums that these
two do work together and its definitely a problem with my apache2
configuration.

Thank you for your help / advice.

Regards, Sam

2008/8/27 WhoAmI <[EMAIL PROTECTED]>

>
> Hi,
>
> is the owner of that directories the same user thet you have set in "User"
> and "Group" (apache2.conf)?
>
>
> On Wed, 27 Aug 2008 09:30:45 +0100, "Sam Wootton" <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > Thank you for the reply, much appreciated.
> >
> > The permissions in the /apache/logs directory are all
> >
> > -rw-rw-r--
> >
> > however, in my attempt (temporarily) to get things working, i did chmod
> > 777
> > on all directories - and this still didn't work (i got the rewrite lock
> > error still).
> >
> > The reason why i am losing my patience with this problem, is that the
> > error
> > msg appears fairly self explanatory (in that apache appears not to have
> > the
> > correct permissions), but i cannot fix it.
> >
> > Regards, Sam Wootton
> >
> > 2008/8/27 Ron Savage <[EMAIL PROTECTED]>
> >
> >> Hi Sam
> >>
> >>
> >> > When i attempt to start apache, i get the following in the access log:
> >> >
> >> > crit (14)Bad address: mod_rewrite: Could not set permissions on
> >> > rewrite_log_lock; check User and Group directives Configuration Failed
> >> >
> >> > I have the user and group directives set correctly in httpd.conf (an
> >> > Administrative user - the same as i had them in apache 1.3). I have
> >> > also tried setting:
> >> >
> >> > RewriteLog "/Library/Apache2/logs/
> >> > rewrite.log"
> >> > RewriteLogLevel 0
> >>
> >> Did you check the permissions on /all/ directories in that path?
> >>
> >> --
> >> Ron Savage
> >> [EMAIL PROTECTED]
> >> http://savage.net.au/index.html
> >>
> >>
> >>
> >> -
> >> The official User-To-User support forum of the Apache HTTP Server
> > Project.
> >> See http://httpd.apache.org/userslist.html> for more info.
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>   "   from the digest: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> --
> -WhoAmI-
>
> Email: [EMAIL PROTECTED]
> WebSite: http://www.autistici.org/whoami/
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[EMAIL PROTECTED] How to restart Apache

2008-08-27 Thread export
Is there a way how to restart Apache if pid file is missing?
I use my own demon.It happened  that the demon deleted  /var/run/apache2.pid   
file.
Then I can not use /etc/init.d/apache2 restart

but I must restart my Debian server by init 6 .
After that the Apache starts normally.

So, if the init 6 can solve the problem  ,
is there a way how to restart Apache without restarting the server( Debian box)
Thank you for help
L.a.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] How to restart Apache

2008-08-27 Thread Bradley Giesbrecht
Others will answer this better I'm sure and I haven't used Debian in a  
while but I would do:


$sudo ps ax | grep httpd

$sudo kill "lowest httpd process id goes here"

$sudo /etc/init.d/apache2 start


Or, since it looks like /var/run/httpd.pid contains only the pid of  
the first (lowest numbered process) httpd process you may have luck  
just creating the httpd.pid file with the lowest numbered process id  
form the ps command with proper owner/group/permissions and use your  
scripts to restart apache2.


$sudo echo "lowest httpd process id goes here" > /var/run/httpd.pid

$sudo /etc/init.d/apache2 restart


This seemed like a simple enough question for someone like me to offer  
a little help.

That said I'd be more concerned about why files are missing.


//Brad


On Aug 27, 2008, at 4:41 AM, [EMAIL PROTECTED] wrote:


Is there a way how to restart Apache if pid file is missing?
I use my own demon.It happened  that the demon deleted  /var/run/ 
apache2.pid   file.

Then I can not use /etc/init.d/apache2 restart

but I must restart my Debian server by init 6 .
After that the Apache starts normally.

So, if the init 6 can solve the problem  ,
is there a way how to restart Apache without restarting the  
server( Debian box)

Thank you for help
L.a.

-
The official User-To-User support forum of the Apache HTTP Server  
Project.

See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Using Apache 2.2.9 + mod_auth_xradius with 2 Radius servers fails

2008-08-27 Thread Emmanuel Bailleul
Hello list,

I've spent a lot of time trying to find a way to use at least 2 Radius
Servers in order to authenticate users in a reverse proxy config. 
I currently use httpd-2.2.9 & mod_auth_xradius-0.4.6. I have tried a lot
of combination even with several Radius products (RSA, ActivID, ...) but
to no avail... If I only use one auth server, everything runs fine.

First I wanted to simply use multiple "AuthXRadiusAddServer" lines in my
httpd.conf, as suggested by mod_auth_xradius, but this feature is buggy,
as one can see here :
http://issues.outoforder.cc/view.php?id=43

I also wanted to use multiple providers in "AuthBasicProvider"
directive, as 2.2's doc suggest.
I've made several tests : 
- if I use "AuthBasicProvider file xradius", the behaviour is as
expected : the user is searched in auth file and if not present Radius
server is queried
- if I use "AuthBasicProvider xradius file", Radius is queried first but
if this fails (server unreachable/not responding), file is never tested.

I also tested almost the same by loading mod_authn_alias and using my
two Radius auth servers :

...


...

AuthBasicProvider Radius1 Radius2

But the behaviour was similar to the previous, no redundancy ...

As mod_auth_xradius is supposed to be 2.1+ API compatible, I thought
this should have worked, but in fact this does not seem to be the case
...

The only remaing solutions for me are :
- hack mod_auth_xradius's code to "force" it to work as expected, but as
I am no developper, this is likely to be a very ugly hack ... 
- use a load balancer in front of my radius servers to guarantee high
availability ...

I was wondering if someone has already experienced such problems using
multiple authproviders, with mod_auth_xradius or more generally with
radius auth redundancy and how he managed to solve this.

Thanks a lot for your help.

Emmanuel Bailleul
Security Engineer
Telindus FRANCE

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] How to restart Apache

2008-08-27 Thread Eric Covener
On Wed, Aug 27, 2008 at 7:41 AM,  <[EMAIL PROTECTED]> wrote:
> Is there a way how to restart Apache if pid file is missing?
> I use my own demon.It happened  that the demon deleted  /var/run/apache2.pid  
>  file.
> Then I can not use /etc/init.d/apache2 restart
>
> but I must restart my Debian server by init 6 .
> After that the Apache starts normally.
>
> So, if the init 6 can solve the problem  ,
> is there a way how to restart Apache without restarting the server( Debian 
> box)
> Thank you for help

Find the root-owned apache process with ps and send the signal you want:

http://httpd.apache.org/docs/2.2/stopping.html

-- 
Eric Covener
[EMAIL PROTECTED]

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] How to restart Apache

2008-08-27 Thread Sander Temme


On Aug 27, 2008, at 6:13 AM, Bradley Giesbrecht wrote:

Others will answer this better I'm sure and I haven't used Debian in  
a while but I would do:


Debian names its httpd 'apache2'.

[EMAIL PROTECTED]:~$ cat /var/run/apache2.pid
5692
[EMAIL PROTECTED]:~$ sudo rm /var/run/apache2.pid
[sudo] password for sctemme:
[EMAIL PROTECTED]:~$ cat /var/run/apache2.pid
cat: /var/run/apache2.pid: No such file or directory


$sudo ps ax | grep httpd


[EMAIL PROTECTED]:~$ ps -lC apache2
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY  TIME CMD
5 S 0  5692 1  0  78   0 - 43517 -  ?00:00:00  
apache2
5 S33  7436  5692  0  77   0 - 43517 -  ?00:00:00  
apache2
5 S33  7437  5692  0  77   0 - 43517 -  ?00:00:00  
apache2
5 S33  7438  5692  0  77   0 - 43517 -  ?00:00:00  
apache2
5 S33  7439  5692  0  81   0 - 43517 -  ?00:00:00  
apache2
5 S33  7440  5692  0  81   0 - 43517 -  ?00:00:00  
apache2


(don't have to be root to do this)


$sudo kill "lowest httpd process id goes here"


The one you want to touch is the one with PPID 1: that's the parent  
process.


[EMAIL PROTECTED]:~$ sudo kill -HUP 5692


$sudo /etc/init.d/apache2 start


[EMAIL PROTECTED]:~$ cat /var/run/apache2.pid
5692

In other words: a restart as effected by the Hangup signal puts the  
pidfile back.


I would be worried about its disapearance in the first place though.

--
Sander Temme
[EMAIL PROTECTED]
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF





smime.p7s
Description: S/MIME cryptographic signature


Re: [EMAIL PROTECTED] How to restart Apache

2008-08-27 Thread Joseph S D Yao
On Wed, Aug 27, 2008 at 01:41:48PM +0200, [EMAIL PROTECTED] wrote:
> Is there a way how to restart Apache if pid file is missing?
> I use my own demon.It happened  that the demon deleted  /var/run/apache2.pid  
>  file.
> Then I can not use /etc/init.d/apache2 restart
> 
> but I must restart my Debian server by init 6 .
> After that the Apache starts normally.
> 
> So, if the init 6 can solve the problem  ,
> is there a way how to restart Apache without restarting the server( Debian 
> box)
> Thank you for help
> L.a.


Check whether the 'killall' or 'skill' commands have been installed on
your system.  Check the manual pages.  You should be aboe to do one of
these [assuming that the information about 'httpd' renamed to 'apache2'
is correct]:
killall -HUP apache2
skill -HUP -c apache2
and then:
cd /
/etc/init.d/apache2 start


It looks like 'killall' is in the "psmisc" package, if you don't have it
installed.

http://www.ducea.com/2008/08/18/killall-in-debian/


I will add my voice to the rising choir saying, find out why the thing
disappears before everything goes.  ;-)  What do you mean, you use your
own daemon?  Do you mean, your own shell script to start the daemon?


-- 
/*\
**
** Joe Yao  [EMAIL PROTECTED] - Joseph S. D. Yao
**
\*/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] lower cpu priority to perl scripts

2008-08-27 Thread Audio Phile
Tamer,

Thank you very much for the reply.  I googled around for the proper syntax of 
your suggestion as well as which config file I need to edit with it, but I came 
up with a big fat 0.  Can you provide a few more details for me?  Apologies in 
advance, I am a newbie with apache2 :)

Tamer Embaby wrote: 
Audio,

You can always start your scripts with [re]nice() syscall to lower
your process (perl script in this case) priority.

Regards,
Tamer

-Original Message-
From: Audio Phile [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2008 8:57 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] lower cpu priority to perl scripts

I'd like to adjust the priority of /usr/bin/perl such that it will always run 
with very low priority.  The PC that I'm using isn't very powerful.  I'm 
running rrdweather on it and when a user hits the weather.cgi about 10 
processes of perl scripts run,
which totally throttles foreground applications until they finish.

How can I assign /usr/bin/perl to always run with a really low CPU priority (a 
really high nice value) for any script it executes? Is this an apache2 setting 
or...?


  

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] limiting user?

2008-08-27 Thread Zach Uram
I wish to add a user account for my friend on my Apache2 webserver
(running in Debian).

How can I limit how much disk space he can use and limit how much bandwidth?

Also I would like it so he cannot explore the filesystem and is
limited to his $HOME directory only.

Zach

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] lower cpu priority to perl scripts

2008-08-27 Thread Richard de Vries
If you are running on unix, the easiest way to probably do this is by calling 
the "setpriority" from within your perl script like this:
setpriority(WHICH,WHO,PRIORITY);
To set your current running perlscript to the lowest priority, you would call 
setpriority(0, $$, 20);
$$ is your script's process ID, and "20" denotes the priority. (as you know, 
-20 is highest priority and 20 the lowest priority). 
Cheers,
   R.

- Original Message 
From: Audio Phile <[EMAIL PROTECTED]>
To: users@httpd.apache.org
Sent: Wednesday, August 27, 2008 2:18:53 PM
Subject: Re: [EMAIL PROTECTED] lower cpu priority to perl scripts

Tamer,

Thank you very much for the reply.  I googled around for the proper syntax of 
your suggestion as well as which config file I need to edit with it, but I came 
up with a big fat 0.  Can you provide a few more details for me?  Apologies in 
advance, I am a newbie with apache2 :)

Tamer Embaby wrote: 
Audio,

You can always start your scripts with [re]nice() syscall to lower
your process (perl script in this case) priority.

Regards,
Tamer

-Original Message-
From: Audio Phile [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2008 8:57 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] lower cpu priority to perl scripts

I'd like to adjust the priority of /usr/bin/perl such that it will always run 
with very low priority.  The PC that I'm using isn't very powerful.  I'm 
running rrdweather on it and when a user hits the weather.cgi about 10 
processes of perl scripts run,
which totally throttles foreground applications until they finish.

How can I assign /usr/bin/perl to always run with a really low CPU priority (a 
really high nice value) for any script it executes? Is this an apache2 setting 
or...?


      

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] lower cpu priority to perl scripts

2008-08-27 Thread david

Audio Phile:

Do you have a comparable example for ActiveState Perl on Windows?


At 03:12 PM 8/27/2008, you wrote:
If you are running on unix, the easiest way to probably do this is 
by calling the "setpriority" from within your perl script like this:

setpriority(WHICH,WHO,PRIORITY);
To set your current running perlscript to the lowest priority, you 
would call setpriority(0, $$, 20);
$$ is your script's process ID, and "20" denotes the priority. (as 
you know, -20 is highest priority and 20 the lowest priority).

Cheers,
   R.

- Original Message 
From: Audio Phile <[EMAIL PROTECTED]>
To: users@httpd.apache.org
Sent: Wednesday, August 27, 2008 2:18:53 PM
Subject: Re: [EMAIL PROTECTED] lower cpu priority to perl scripts

Tamer,

Thank you very much for the reply.  I googled around for the proper 
syntax of your suggestion as well as which config file I need to 
edit with it, but I came up with a big fat 0.  Can you provide a few 
more details for me?  Apologies in advance, I am a newbie with apache2 :)


Tamer Embaby wrote:
Audio,

You can always start your scripts with [re]nice() syscall to lower
your process (perl script in this case) priority.

Regards,
Tamer

-Original Message-
From: Audio Phile [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2008 8:57 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] lower cpu priority to perl scripts

I'd like to adjust the priority of /usr/bin/perl such that it will 
always run with very low priority.  The PC that I'm using isn't very 
powerful.  I'm running rrdweather on it and when a user hits the 
weather.cgi about 10 processes of perl scripts run,

which totally throttles foreground applications until they finish.

How can I assign /usr/bin/perl to always run with a really low CPU 
priority (a really high nice value) for any script it executes? Is 
this an apache2 setting or...?





-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Apache2 rewrite_log_lock

2008-08-27 Thread Ron Savage
Hi Sam


> The permissions in the /apache/logs directory are all

Lower case A? No 2?

See below.

> -rw-rw-r--
> 
> however, in my attempt (temporarily) to get things working, i did
> chmod 777 on all directories - and this still didn't work (i got the
> rewrite lock error still).
[snip]

> >
> > RewriteLog "/Library/Apache2/logs/

/Library? Upper case A? 2?

> > rewrite.log"
> > RewriteLogLevel 0

>From the docs, http://127.0.0.1/manual/mod/mod_rewrite.html#rewritelog
it says: 'The RewriteLog directive sets the name of the file...'

So
1) It's a file name not a dir name
2) Ensure all components of the path are meaningful
3) Patch httpd.conf and restart the server

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]