The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cloudlinux and zendopcache module

Discussion in 'CloudLinux' started by ASTRAPI, Aug 28, 2014.

  1. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    I just install Cloudlinux lve manager, cagefs, php selector and all working great.

    Then i try to enable for one site without traffic the zendopcache by enabling from the account cpanel for php 5.5 the module opcache.

    I upload a panel for it on a folder and yes load fine and give me all stats :)

    And is using 5mb only and 0 hits (ok as there is not traffic there)

    Then i try it on bigger site with about 100 users online Joomla with Kunena forum...

    I got again 5mb memory usage (i mean in the cache not system) and again 0 hits even i browse the site and forum all stats are the same..

    Never happend that ....

    I am using Suphp and Suexec i don't know if this is the problem....

    Also i notice that on this site the extension of the links are in .hml and not .php and i don't know why as there is dynamic content 100% and do you think this is the problem?

    Any ideas how to fix this?

    Thanks
     
  2. someB0dy

    someB0dy Member

    Joined:
    May 24, 2010
    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi,

    Something is not Ok there, it should produce some load and CPU/Memory usage in lveinfo (you may also try to check 'lveps -p' output).

    If you are sure that is dynamic content (joomla is !) then even .htm files could be processed as php with some directives in .htaccess file .

    But overall do you use CageFS ? And do you have mod_hostinglimits module in apache (could check with 'httpd -M | grep hostinglim' )? And provide an output of:
    strings /opt/suphp/sbin/suphp | grep lve
    strings /usr/local/apache/bin/suexec | grep lve
     
  3. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Yes i am sure that is Joomla 100% !

    Yes i have cagefs.

    root@server [~]# httpd -M | grep hostinglim
    Syntax OK
    hostinglimits_module (shared)


    root@server [~]# strings /opt/suphp/sbin/suphp | grep lve
    Could not resolve path "
    liblve.so.0
    lve_jail_uid


    root@server [~]# strings /usr/local/apache/bin/suexec | grep lve
    liblve.so.0
    lve_jail_uid

    Thanks
     
  4. someB0dy

    someB0dy Member

    Joined:
    May 24, 2010
    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Could you clarify where you see 5mb used? In 'lveinfo' output? Also, kernel version from 'uname -r'?

    So far everything appears to be correct ... does that site really resolves to your server?
     
  5. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    suPHP is not generally compatible with any OPCode caching mechanism such as Zend OPcache. You could temporarily try using a different PHP handler to see if you experience different results.

    Thank you.
     
  7. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    If i change handler to fastcgi do i have to change any folders or files permissions?

    As i remember if i am not wrong i had to change folders to 755 and files to 644 to get suphp work...

    Do i have to do something related to change the handler to fcgi?

    Thanks
     
  8. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    I just try to change the handler to fcgi with suexec on and i am getting error 503 on my site :(
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can find considerations for other PHP handlers here:

    Apache - PHP Request Handling

    Review /usr/local/apache/logs/error_log when you see errors like that in your browser to determine the cause.

    Thank you.
     
  10. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5

    Thanks
     
    #10 ASTRAPI, Aug 28, 2014
    Last edited: Aug 28, 2014
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's typically logged to /usr/local/apache/logs/error_log. Are you sure you refreshed the browser correctly, or greped the error log for that specific error code? It's likely a Mod_Security rule being hit.

    Thank you.

    Mod Note: You edited your previous post with the actual error message, so this post might not apply.
     
  12. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5

    Searching on the net i found:

    This issue commonly occur due to lower value of MaxRequestsPerProcess.

    Solution : adjust these with higher values:

    MaxRequestsPerProcess 1000
    DefaultMaxClassProcessCount 120
    IdleTimeout 60
    MaxProcessCount 2000
    IPCCommTimeout 40
    IPCConnectTimeout 10
    MaxRequestLen 10240000

    My server has a lot of ram and cpu power:

    CPU: Intel Xeon
    2x E5-2650v2
    16c/32t 2,6 GHz+/3,4 GHz+

    RAM: 128 GB DDR3 ECC 1600MHz

    Please recommend me what values to use for this server so it will not go down after a few days if i get a few more users online ?

    Thanks
     
    #12 ASTRAPI, Aug 28, 2014
    Last edited: Aug 28, 2014
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Your previous post is a separate issue, so you should post it to our Optimization forum:

    cPanel Forums - Optimization

    This thread should focus on getting Zend OPcache to work properly, as opposed to custom Mod_FCGI tuning. That being said, you can apply those values to see if it resolves the error message in the meantime. The entries are added via "WHM Home » Service Configuration » Apache Configuration » Include Editor » Pre Main Include" within IfModule tags.

    Thank you.
     
  14. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Every few minutes (less than 10) the zend opcache is reseting/restarting :(

    Every refreshin the scripts increase on the zend opcode cacher and that's good but after one refresh the 548 scripts cached goes down to 190 :(

    I don't know if there is any expire cache option or anything related that cause that or a bug ....?
     
  15. iseletsk

    iseletsk Well-Known Member

    Joined:
    Mar 3, 2010
    Messages:
    163
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Princeton, New Jersey, United States
    This is normal for mohttp://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgididletimeoutd_fcgid. This is due to various timeouts for processes for mod_fcgid.
    You can increase those options, but it will create other issues.
    (see idle timeout, etc...)
    I would recommend switching to mod_lsapi -> as it doesn't have that problem.
     
  16. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Ok after enabling the mod_lsapi what i must configure in general and what i must configure for this problem?

    Thanks
     
  17. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Either set mod_lsapi up serverwide, or just enable per-domain. I have it installed, and then I just add an appropriate AddType line in the .htaccess file of the site I want to test with so it uses lsphp.

    Then, I go into PHP Selector and choose PHP 5.5 and add the Opcache / APU modules.

    Works for me -- However, the cached data isn't cached for long [but apparently it isn't supposed to be].

    I do notice huge improvements if I have an application that can make use of the Opcache stuff in PHP 5.5 (such as Wordpress + W3 Total Cache -- setting everything to use APC rather than disk-based caching). When I would do simple load tests with the 'ab' utility that comes with Apache, a standard cPanel suPHP site with no caching is abysmal, and in comparison if I run the same site with lsphp / PHP 5.5+Opcache+APU+W3 Total Cache set to use APC it performs magnitudes better under heavy site load.

    mike
     
  18. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    If i want to use after installation the mod_lsapi global for all domains do i have to add that line on .htaccess?

    "the cached data isn't cached for long"

    Why? Is there any setting to keep them for more or is a problem with it?

    Thanks
     
  19. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I don't think so. Read the documentation. I think if you specifically issue the commands to enable it on all sites, it adds an appropriate line in httpd.conf. If you have it disabled and then only issue commands to add it per-domain, I think it then goes and adds an AddType line to the .htaccess in the root web of that specific site.

    I'm just testing, so I did not even attempt to enable it across the border. Instead I just go and add the appropriate line to .htaccess to enable it while testing and then comment out the line out when I'm done testing.

    I'm not a opcode cache guru. I'll defer to somebody else to answer your question.

    M
     
  20. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    868
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    ASTRAPI
    You did add the zend_opcache config to your /usr/local/lib/php.ini file right?
    Example Only !
    Code:
    zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
    opcache.memory_consumption=256
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=4000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    opcache.enable_cli=1
    opcache.enable=1
    Then restart Apache
     
Loading...

Share This Page