[RESOLVED] APC not working correctly?

azn_romeo_4u

Well-Known Member
#1
On "Uptime" it always says 0 or 1 minute. During that minute it caches and stuff...then just resets.

This is all i got in php.ini

extension = "apc.so"
apc.shm_size = 64

This is apc.php


Edit. When I switch to apache, it works and continues to cache. Uptime and everything seems to work. But right when I change to litespeed, it resets itself. Uptime is then 0 again.

Edit. I scoured the web...can't really figure it out.

Also read a bunch of threads on this forum...nothing.

I followed the wiki...but do got a question regarding

include_path = ".:/php5install/php5"
What's suppose to do go there? this?

include_path = ".:/usr/local/lib/php"

If so...didn't do anything. Is the apc.so suppose to be in there? I also tried the enviroment thing I read on here. Max Connection = to PHP_LSAPI_CHILDREN and instances set @1. Didn't seem to do anything either.
 
Last edited:

azn_romeo_4u

Well-Known Member
#3
Yup I have exntension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/" in php.ini and

extension = "apc.so"
apc.shm_size = 64

somewhere in php.ini as well. I'm still confused on that one this one though include_path = ".:/usr/local/lib/php"

But I don't think it's problem...cuz when I turn on apache...it works...but when I turn on litespeed, it doesn't work. So many a wrong setting in litespeed?
 

NiteWave

Administrator
#4
1.does file
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so exists?

2.any related messages in error.log and stderr.log?
 

azn_romeo_4u

Well-Known Member
#7
Not sure which version...but I don't think the latest version that just came out...since I odn't know how to update properly, and it seems like a few bugs have to worked out
 
Last edited:

NiteWave

Administrator
#8
the APC version 3.0.19. not sure rebuild PHP 5.2.11 + latest APC 3.1.3p1 will solve the problem. Build PHP through lsws admin console is convenient and safe.
 

azn_romeo_4u

Well-Known Member
#9
Same problem. I recompiled APC from source with the version you suggested, and I thought it was working but after 2 minutes didn't work. Next I recompiled php through the lsws admin console and same problem. Also when I switch back to apache, it seems to be caching.
 
Last edited:

mistwang

LiteSpeed Staff
#10
APC does not work well with PHP suEXEC as each PHP process will use its own cache memory, not shared.

You should try eAccelerator + /dev/shm if you need to use PHP suEXEC.
 

azn_romeo_4u

Well-Known Member
#11
Thank you mw. That might have been the problem. I took out APC and recompiled and went with XCACHE instead. However I had the same problem. It would restart itself. Then I went and disabled SuEXEC (Configuration > Server > General > Php Suexec > No) and it's loading now (XCache is). I'll probably try APC again in the future to see if that will also help with the problem.

But for now it fixed, weeeeeeeeeeeeeeeee. Server load is soooooo much better
 

azn_romeo_4u

Well-Known Member
#12
Okay I have another problem. With php suexec turned off, all instances of media wiki upload functions don't work probably. Not sure how they code their thing but I think base on what I read, it requires that the user by run by the user of the site. But with phpsuexc off, everyone is running as nobody.

Is there anything I can do?
 
#15
Sorry can you explain what you mean? Do you mean chmodding the folder that it's uploaded tom to 777? I have tried that or do you mean something else?
also need check its parent folder's permission.

sudo -u <user_run_lsphp5> cat <upload_folder>/test.txt

is a quick way to check all parent folders's permissions.

Okay I have another problem. With php suexec turned off, all instances of media wiki upload functions don't work probably. Not sure how they code their thing but I think base on what I read, it requires that the user by run by the user of the site. But with phpsuexc off, everyone is running as nobody.

Is there anything I can do?
This maybe due to various apache rules to prevent a user to upload files to a folder out of his home. Add alias for each user's upload folder, point to a common upload area, maybe a way to resolve this issue. Not sure if there are better ways.
 
Last edited:
#16
We had the same problem where APC keeps crashing. We then reverted PHP LSAPI back from 5.3 to 5.2, everyting was smooth again.

EDIT: Spoke too soon. Somehow we still get the same issue... :(
 
Last edited:
Top