l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2001 Dec 30 17:08

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Apache timing out
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Apache timing out



On Tue, 28 Aug 2001, Larry Ozeran wrote:

> I am new to both apache (1.3) and Linux (RH 7.1). I am having a problem
> where CPU utilization is exceeding 30 seconds and the process is dying
> unfinished. I am organizing a word list (a few thousand unique words)
> culled from a group of articles (currently about 65 with a few hundred
> thousand words) to later be used for rapid searching on our web site.

Why not invoke this offline... directly? Bypass using the CGI for this
long process entirely?  Run it at low priority late at night?

> Even
> using B-trees, this still requires a large number of string comparisons. I
> know it is doing useful work and not in an infinte loop by the partial
> output I get as it proceeds. I am not sure how to proceed to change timing
> limits. I know there is an Apache limit, and I suspect there is a Linux
> limit. I found an Apache directive (RLimitCPU) that would appear to address
> this problem, but I can't figure out from the documentation where to put it :(

RLimitCPU, RLimitMEM, RLimitNPROC

"All three directives can be set either in the main configuration or in a
VirtualHost container, so you can allocate limits to websites
differently.  They don't work in other containers like Directory."

-- "Professional Apache" pp 205.

> 
> Where do I look in linux to find / set CPU usage limits for users? I've
> checked a couple of Linux books, online FAQs and documentation and searched
> google. I must be looking for the wrong thing; all I am finding is monitors
> that display CPU usage. Any help would be appreciated.

man 1 ulimit
man 2 setrlimit

But I suspect the apache directives use setrlimit to get the job done, so
just use them.

Apache does get started by a startup file (/etc/rc.d/httpd or some such, I
think) running as root, and once it switches to a non-root user it won't
be allowed to increase its own cpu allotment. However, I wouldn't expect
it to be running with cpu limits at startup.  You could insert a
"ulimit -t >/var/apache_ulimit_status" in the startup script to confirm
this, or use ulimit to increase it if necessary, but I really think apache
is imposing this on itself.  30 seconds is an awfully long time for a user
to wait.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!