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

Go Back   LiteSpeed Support Forums > External Applications > PHP > Trying to use APC but it seems to be clearing out?

Reply
 
Thread Tools Display Modes
  #31  
Old 06-24-2011, 06:16 PM
cmanns cmanns is offline
Senior Member
 
Join Date: Jun 2010
Posts: 100
Quote:
Originally Posted by NiteWave View Post
so the issue is: lsws restarts about once 1 hour in unknown reason, and that can explain the cache reset issue. true?
I'm running 4.1.1 and it exists every hour or so too without reason.


Anyways guy try this

We got child procs to 4 (half of cpu's, we have muti-client using php so we dont want them overtaking all cpus by 1 proc on accident randomly)

max req per proc on php is 2500, 5000 caused one proc to do 90% cpu roughly on some clock strace I thought I posted the error here but seems I forgot (was tired, sorry nitewave

2000/2500 seems nice. XCache caches decent, php process idle time is 120 seconds so it's hopefully one of the 4 possibly spawned per 20 or so vhosts is active. Ram seems okay barely swap on a 10gb system with high mem tuned mysql with 16gb of db's
__________________
-William C.Manns Owner of XenServ Co
Need LiteSpeed Hosting, Server Tuning, or Other Help I'm your guy

http://xenserv.com http://evilpuma.com
Reply With Quote
  #32  
Old 11-18-2011, 04:30 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
I've been experiencing cache clearing as well. I have configured Litespeed to let PHP/LSAPI to self-manage its instances:

Instances: 1
Suexec: on
Max connections: 64
PHP_LSAPI_CHILDREN=64
LSAPI_CHILDREN=64

From my experience with PHP-FPM (where opcode caches work perfectly) the process tree in litespeed should work as:
- lshttpd
-- lsphp5 process manager
--- lsphp5 (as user example1 - child process)
--- lsphp5 (as user example1 - child process)
--- lsphp5 (as user example2 - child process)
--- lsphp5 (as user example2 - child process)

where the lsphp5 process manager spawns lsphp5 processes running as suexec user example1 and example2 depending on the requests served and each one of them can read/write the process manager's shared memory segment that caches both example1 and example2 user files.

What I get on Litespeed is no lsphp5 process manager and many example1 processed that each one of them run their own mmap cache segment which in turn constitutes any opcode cache useless.

We *need* an operational opcode cache mechanism on Litespeed! Please fix it!
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #33  
Old 11-18-2011, 06:00 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Quote:
I have configured Litespeed to let PHP/LSAPI to self-manage its instances
since you set
Quote:
Suexec: on
lsphp is not in self-manage mode.

Quote:
any opcode cache useless.
when php suExec enabled, only eAccelerator able to share opcode cache between processes, since the opcode cache is saved on disk.
Reply With Quote
  #34  
Old 11-18-2011, 06:16 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
This should be then a feature request then, since with suexec disabled PHP is pretty much useless in a shared environment.

FYI, nginx + php-fpm operates EXACTLY as fastcgi + opcode cache should.
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #35  
Old 11-18-2011, 01:50 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
that feature is on our to-do list. no ETA yet.
Reply With Quote
  #36  
Old 11-23-2011, 02:06 AM
prandah prandah is offline
Member
 
Join Date: Oct 2011
Posts: 27
hello, how to know
xcache, apc, eacelarator is actif ?
any advice ?
Reply With Quote
  #37  
Old 11-23-2011, 10:14 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Quote:
Originally Posted by prandah View Post
hello, how to know
xcache, apc, eacelarator is actif ?
any advice ?
1. create a phpinfo page like

Quote:
echo "<?php phpinfo(); ?>" > /path/to/file/named/phpinfo.php
then point browser to that file and see if you have these listed.

or

2. run command line

Quote:
/usr/local/lsws/fcgi-bin/lsphp5 -i | egrep -i 'apc|xcache|eaccelarator'
if nothing comes up, then none of them is compiled in lsphp.
Reply With Quote
  #38  
Old 11-23-2011, 10:56 AM
prandah prandah is offline
Member
 
Join Date: Oct 2011
Posts: 27
hello thanks for reply

Code:
[root@poseidon ~]# /usr/local/lsws/fcgi-bin/lsphp5 -i | egrep -i 'apc|xcache|eaccelarator'
Configure Command =>  './configure'  '--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed' '--with-zlib' '--with-mysql' '--with-curl' '--with-config-file-path=/opt/lsws/php5' '--with-ioncube' '--with-pic' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-gettext' '--with-jpeg-dir=/usr' '--with-png' '--with-xcache' '--enable-xcache' '--with-php-config=/usr/local/lsws/lsphp5/bin/php-config' '--enable-suhosin'
[root@poseidon ~]#
what a command to compile it ?
Reply With Quote
  #39  
Old 11-23-2011, 11:21 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
They are not part of php source so you can NOT do --enable or --with to compile them. Refer to their own document for compile/install with php.

eAccelerator: https://eaccelerator.net/wiki/InstallFromSource
APC: http://www.php.net/manual/en/apc.installation.php
xCache: http://xcache.lighttpd.net/wiki/InstallFromSource
Reply With Quote
  #40  
Old 11-23-2011, 01:03 PM
prandah prandah is offline
Member
 
Join Date: Oct 2011
Posts: 27
hello thanks for your reply
there is true ?

PHP Code:
[root@pegasus php]# /usr/local/lsws/fcgi-bin/lsphp5 -i | egrep -i 'apc|xcache|eaccelarator'
    
with XCache v1.3.1Copyright (c2005-2010by mOo
XCache
XCache Support 
=> enabled
xcache
.admin.enable_auth => On => On
xcache
.cacher => On => On
xcache
.coredump_directory => no value => no value
xcache
.count => => 1
xcache
.gc_interval => => 0
xcache
.mmap_path => /dev/zero => /dev/zero
xcache
.readonly_protection => => 0
xcache
.shm_scheme => mmap => mmap
xcache
.size => => 0
xcache
.slots => 8K => 8K
xcache
.stat => On => On
xcache
.test => => 0
xcache
.ttl => => 0
xcache
.var_count => => 1
xcache
.var_gc_interval => 120 => 120
xcache
.var_maxttl => => 0
xcache
.var_size => => 0
xcache
.var_slots => 8K => 8K
xcache
.var_ttl => => 0
[root@pegasus php]
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:40 AM.



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