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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Litespeed in server managed mode

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2012, 02:41 PM
bettinz bettinz is offline
Member
 
Join Date: May 2011
Posts: 28
Default Litespeed in server managed mode

Hello,

I use Xcache on a shared hosting on my VPS. I need that the opcode memory is not shared by the account for security purpose; so I need to change from self managed mode, to server managed mode.

I've read that instances should match max connections.

So now I have:

Instances: 35
Max Connections: 35
LSAPI_CHILDREN=35

Is that correct? Because with this settings, the opcode memory is shared.

If I set LSAPI_CHILDREN, to 0, 1 or ?, the server doesn't reply (website load forever).

If I delete LSAPI_CHILDREN, the server say 503, internal server error.

I use Xcache. With self managed mode, everything works.

Thank you
Reply With Quote
  #2  
Old 11-05-2012, 02:54 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
you should just use self managed mode (Instances: 1).
Reply With Quote
  #3  
Old 11-05-2012, 03:02 PM
bettinz bettinz is offline
Member
 
Join Date: May 2011
Posts: 28
Thank you, but why? I mean, server managed is not a supported mode of Litespeed? And what can you tell me about shared memory with opcode? Is it a security problem if "n" sites share the same opcode memory?
Reply With Quote
  #4  
Old 11-05-2012, 03:04 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
prior to 4.2, you can not use opcode cache in shared environment. With PHP suEXEC daemon mode in 4.2, you can.

http://blog.litespeedtech.com/2012/0...c-daemon-mode/
Reply With Quote
  #5  
Old 11-05-2012, 03:14 PM
bettinz bettinz is offline
Member
 
Join Date: May 2011
Posts: 28
I've 4.2 on my server with LSAPI 6, I know the new feature with daemon mode. Infact in the past I've never used Xcache or any opcode cache.

The question is the security about opcode shared memory with shared environment. Because in self managed mode, i quote:

Quote:
Self Managed Mode is preferred because all PHP processes can share one shared memory block for the opcode cache.
http://www.litespeedtech.com/php-litespeed-sapi.html
Reply With Quote
  #6  
Old 11-05-2012, 04:10 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
The environment in the quote is for dedicated (All PHP processes runs as one user). As pointed out before, you can _NOT_ use opcode cache in shared environment prior to 4.2.
Reply With Quote
  #7  
Old 11-05-2012, 04:29 PM
bettinz bettinz is offline
Member
 
Join Date: May 2011
Posts: 28
Ok, I understand. But now help me about my situation:
I've litespeed 4.2, a VPS with 30 sites, daemon mode, xcache.

Is my settings correct? 1 instance, 35 Max connections and children, xcache enabled.

Is xcache safe with this settings and situation? Sorry but the documentation is not complete in this point.

I ask that because if I load the admin file of xcache via ftp, I can see the caches file of all users in my VPS. So an user can access to all cached files on my VPS

thanks

Last edited by bettinz; 11-05-2012 at 04:33 PM..
Reply With Quote
  #8  
Old 11-05-2012, 04:36 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Yes, your settings are fine with 4.2. that one instance is the parent to spawn/manage all the children processes. in daemon mode, xcache (and other opcode cache) is safe to be shared by PHP processes with different userid (shared environment).
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:25 AM.



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