XCache issues

Discussion in 'Install/Configuration' started by Monarobase, Jan 19, 2013.

  1. Monarobase

    Monarobase Well-Known Member


    I'm trying to get XCache 3.0.1 configured so I can use namespacing (prefixing variable names with user id).

    I haven't activated Litespeed on port 80 yet as I'm trying to get Xcache working with Apache first so I know what works before I move everything to litespeed.

    I've got APC working well with Litespeed LSAPI (CloudLinux CageFS Suexec deamon) and with ASL's Trotix in front I get download times of a echo "hello world" php script of between 14 and 60ms, which concidering I'm moving from modsecurity + apache where I had times between 50 and 140ms it's very good.

    When I activate Xcache 3.0.1 however Apache FCGI processes seem to crash quite often, I can't login to the admin page, and I don't get any impression that anything is being accelerated.

    I've come to the conclusion that I haven't managed to configure it correctly or that I've got something that isn't compatible.

    Does XCache work with Suexec ? I've read advice here from a few years ago saying that it wasn't compatible (this was XCache 1.3 and older versions of Litespeed). Should I work correctly with the current versions of Litespeed ?

    Here's my current configuration :

    extension = xcache.so
    xcache.admin.enable_auth = On
    xcache.admin.user = "user"
    xcache.admin.pass = "mymd5********"
    xcache.shm_scheme =        "mmap"
    xcache.size  =               128M
    xcache.count =                 32
    xcache.slots =                20K
    xcache.ttl   =                 600
    xcache.gc_interval =           600
    xcache.var_size  =            4M
    xcache.var_count =             1
    xcache.var_slots =            8K
    xcache.var_ttl   =             120
    xcache.var_maxttl   =          300
    xcache.var_gc_interval =     300
    xcache.var_namespace_mode =    2
    xcache.var_namespace =        "gid"
    xcache.readonly_protection = On
    xcache.mmap_path =    "/tmp/xcache"
    xcache.coredump_directory =   ""
    xcache.coredump_type =         0
    xcache.disable_on_crash =    Off
    xcache.experimental =        Off
    xcache.cacher =               On
    xcache.stat   =               On
    xcache.optimizer =           Off
    xcache.coverager =           Off
    I'm not sure how the mmap works, I've created /tmp/xcache and set it's chmod to 777

    Maybe I shouldn't created that folder ? I created it because I didn't see any files names xcache in the tmp folder.

    I've read that xcache.mmap_path shouldn't be a folder, and it didn't like /dev/zero either…

    Here are a few errors I was getting when Xcache was activated :

    I'm gessing that if I get these errors with FCGID I will also get them with litespeed…

    I forgot to give my server configuration as some settings refer to this.

    I've got a total of 32 CPU threads and 256GB of RAM. I want Xcache to make the best use possible of these ressources.

    Thanks !
    Last edited: Jan 19, 2013
  2. NiteWave

    NiteWave Administrator

    please try litespeed directly. there is free 2-CPU trial license working for 15 days, we can extend the trial period with another 15 days per your request, total 30 days should be enough to test.

    in shared hosting, for opcode cache, only eAccelerator(use disk instead of memory as opcode storage) is recommended before, for apache,cPanel or litespeed.

    php suEXEC daemon is quite new and introduced in September,2012:
    it's working only with litespeed, not with apache. with this mode, APC and Xcache is practically possible in shared hosting. and by the discussion in recent days, only xcache at present is practically possible to work with php suEXEC daemon mode(enable opcode cache and variable cache in memory for each user and users can't access each other)

    if not in shared hosting environment(which may have thousands of different user accounts), all php scripts are running under one user or several known users, APC or XCache has been working well and popular for years until now.
  3. Monarobase

    Monarobase Well-Known Member

    I've done some research to try and find out if XCache 3.0.1 is compatible or not with PHP 5.3… I haven't found any information that says the contrary so I presume it is.

    I've got an issue that I need to resolve before switching to litespeed to try and see if it works better with XCache that Fcgid :

    I use ASL on this server and it seems to have a bug that re-enables modsecurity every time the rules are updated and when the mod_security.conf is enabled litespeed seems to try and import it.

    Any idea how I could tell litespeed not to try and run the files in /usr/local/apache/conf.d/ ?

    I presume litespeed detects this in httpd.conf and tries to import the data…
  4. NiteWave

    NiteWave Administrator

    I think any file without extension .conf won't be imported.
    so if not want litespeed import abc.conf, just rename its extension name, to say conf_disable
  5. Monarobase

    Monarobase Well-Known Member


    The problem was (and still is) that ASL seems to recreate the .conf file every time it updates the rules !

    I've added mod_security to the list of modules Litespeed shouldn't load and it seems to have done the job.

    I'm now trying to find out why Litespeed is slower than Apache with FCGID… shouldn't it be faster ?

    I'll open a new topic when I'm sure that nothing else is slowing things down.

    I don't know why but your forum keeps cutting of the end of my messages and I have to click on return to copy the text then on edit to replace with the full text !
  6. Monarobase

    Monarobase Well-Known Member

    I think the XCache issues are solved, it wouldn't work with fcgid but seems to work with Litespeed !

    I've now got some 503 error messages, I will open a new topic for this :)
  7. Monarobase

    Monarobase Well-Known Member

    Now cPanel has updated xcache to 3.0.1, I'm either going to have to install Xcache 2 manually or find time to debug what is happening with version 3.0.1

    Edit :

    I mixed up a feature request and a news in my rss feed manager. I don't think cPanel has updated xcache yet ! :)
    Last edited: Feb 5, 2013

Share This Page