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
  #71  
Old 09-01-2012, 08:49 PM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
Code:
- litespeed uptime is good, but
- apc uptime is bad
if you refresh the apc stats page repeatly,
check the apc.mmap_file_mask value, like /tmp/apc.nyEjzk,
you should see 2 different files, corresponding 2 groups of lsphp5.
I see no "apc.mmap_file_mask" on my stats page. I think because my APC was compiled with "--disable-apc-mmap".
Should i recompile APC with mmap?
(as far as i remember, when my APC had mmap, i only saw 1 apc.mmap_file_mask value on stats page)

If not, what should i do?
__________________
I use litespeed
Reply With Quote
  #72  
Old 09-01-2012, 11:24 PM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Quote:
Should i recompile APC with mmap?
yes, please. we study the option -disable-apc-mmap in 2 ways:
1.by reading the APC source code
2.actual tests

as we pointed out in previous thread: it not working at all.
--enable-apc-mmap is enabled by default since APC 3.0.18.
so it's a better method than --disable-apc-mmap which is default before 3.0.18

Quote:
i only saw 1 apc.mmap_file_mask value on stats page
please refresh repeatedly, it should have 2 values if you have 2 groups of lsphp5
Quote:
root@mybox [~]# pstree -p | grep litespeed
|-litespeed(19722)-+-httpd(19723)
| |-litespeed(19724)-+-lsphp5(19730)-+-lsphp5(19734)
| | |-{litespeed}(19726)
| | `-{litespeed}(19728)
| `-litespeed(19725)-+-lsphp5(19772)-+-lsphp5(19809)
| |-{litespeed}(19727)
| `-{litespeed}(19729)
one group is lsphp5(19730), another one is lsphp5(19772)
Reply With Quote
  #73  
Old 09-02-2012, 12:08 AM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
yes, please. we study the option -disable-apc-mmap in 2 ways:
1.by reading the APC source code
2.actual tests

as we pointed out in previous thread: it not working at all.
--enable-apc-mmap is enabled by default since APC 3.0.18.
so it's a better method than --disable-apc-mmap which is default before 3.0.18


please refresh repeatedly, it should have 2 values if you have 2 groups of lsphp5


one group is lsphp5(19730), another one is lsphp5(19772)
I have recompiled APC with mmap enabled.

But i still see 1 value. Is it the cause of my problem?

FYI i have LSAPI_AVOID_FORK=1 , i don't know whether it is related with 1 mmap or not.
Code:
root@mybox [~]# pstree -p | grep litespeed
        |-litespeed(24846)-+-httpd(24847)
        |                  |-litespeed(24848)-+-lsphp5(24856)-+-lsphp5(24857)
        |                  |                  |-{litespeed}(24850)
        |                  |                  `-{litespeed}(24851)
        |                  `-litespeed(24849)-+-lsphp5(24901)-+-lsphp5(24904)
        |                                     |-{litespeed}(24852)
        |                                     `-{litespeed}(24853)
Code:
apc.cache_by_default	1
apc.canonicalize	1
apc.coredump_unmap	0
apc.enable_cli	1
apc.enabled	1
apc.file_md5	0
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	3600
apc.include_once_override	0
apc.lazy_classes	0
apc.lazy_functions	0
apc.max_file_size	20M
apc.mmap_file_mask	/tmp/apc.3iYCNd
apc.num_files_hint	1000
apc.preload_path	
apc.report_autofilter	0
apc.rfc1867	0
apc.rfc1867_freq	0
apc.rfc1867_name	APC_UPLOAD_PROGRESS
apc.rfc1867_prefix	upload_
apc.rfc1867_ttl	3600
apc.serializer	default
apc.shm_segments	1
apc.shm_size	1024M
apc.slam_defense	1
apc.stat	0
apc.stat_ctime	0
apc.ttl	0
apc.use_request_time	1
apc.user_entries_hint	4096
apc.user_ttl	7200
apc.write_lock	1
__________________
I use litespeed
Reply With Quote
  #74  
Old 09-02-2012, 08:25 PM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Quote:
But i still see 1 value. Is it the cause of my problem?
should not be possible.

maybe your site's traffic is idle ? if so, you can generate some traffic and test again. also, you can create a script to access apc.php for 100 or 1000 times, grep "Uptime" and "apc.mmap_file_mask" every time, should be able to see 2 values.
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 10:29 PM.



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