LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > lshttpd & lscgid processes?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2008, 01:09 AM
28122008 28122008 is offline
Member
 
Join Date: Dec 2008
Posts: 13
Question lshttpd & lscgid processes?

Hi everyone..

Installing litespeed was so easy and now being a techy i am trying to understand the nitty-gritties of its working model. At the first start using "lswsctrl start", it launched 3 processes:

root 27971 0.0 0.6 5104 1776 ? S 08:31 0:00 ./lshttpd
root 27973 0.0 0.1 1584 320 ? S 08:31 0:00 httpd (lscgid)
nobody 27974 0.0 0.6 5540 1612 ? S 08:31 0:00 ./lshttpd

At quick look at the output of netstat revealed that the first process started by root is listening to both admin and http ports while the other two are its children. Now I wonder being a web server working on the ansynchrous select based model, why it has launched another copy of lshttpd? And whats the purpose of this "lscgid"? After replacing this file with a dummy executable I found out that although litespeed starts, and php scripts work but cgi scripts don't. So is it basically to provide just age old CGI functionality? Will PHP in fastcgi mode work without this daemon or this is required for FCGI too? If its just for CGI, I really don't need it so can it be stopped?

Now back to my original question about two copies of "lshttpd" processes? Is the first one just to listen to ports and second one to handle connections? I tried changing "Auto Restart" to on and off but in both cases there are 2 copies of lshttpd running, contrary to the description of this feature. Under normal conditions does the parent process kills this one children after some number of connections and forks another child?

I would be really glad to someone who can answer to my curiousities.

-Regards,
Akash
Reply With Quote
  #2  
Old 12-28-2008, 05:07 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
cgid is for CGI and suEXEC, you should keep it running.
the parent lshttpd process is the watchdog process, which will start new child process if any child process crash for any reason. It will not quit by itself.
Reply With Quote
  #3  
Old 12-28-2008, 07:06 PM
28122008 28122008 is offline
Member
 
Join Date: Dec 2008
Posts: 13
Quote:
Originally Posted by mistwang View Post
cgid is for CGI and suEXEC, you should keep it running.
the parent lshttpd process is the watchdog process, which will start new child process if any child process crash for any reason. It will not quit by itself.
You didn't clarify about the "Auto Restart" function. Turning it on or off doesn't have any impact on the number of running processes contrary to its description.

So 2 lshttpd processes are bare minimum required to be running in order to make litespeed start serving files? Isn't there anyway to give rest to the watchdog process and let the worker keep doing its task? Also by any chance is it possible to run the server as root?

The reason why I wish to turn off lscgid is that I don't use CGI at all. Litespeed with PHP in SAPI or FCGI mode is enough for me. Also as I am the sole user on the server, serving my own files and I don't intend to use suexec either. So is there any way to do it?

Last edited by 28122008; 12-28-2008 at 08:36 PM..
Reply With Quote
  #4  
Old 12-28-2008, 08:14 PM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
LSAPI is better than FCGI mode anyway.

Quote:
Originally Posted by 28122008 View Post
The reason why I wish to turn off lscgid is that I don't use CGI as all. Litespeed with PHP in SAPI or FCGI mode is enough for me. Also as I am the sole user on the server, serving my own files I don't intend to use suexec either. So is there any way to do it?
I've always wondered about the lscgid process too and I don't need to use CGI at all. It always show 1 under Pool in real-time statistics.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:41 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.