Cloudlinux and zendopcache module

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
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
 

someB0dy

Member
May 24, 2010
22
2
53
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
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
Yes i am sure that is Joomla 100% !

Yes i have cagefs.

[email protected] [~]# httpd -M | grep hostinglim
Syntax OK
hostinglimits_module (shared)


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


[email protected] [~]# strings /usr/local/apache/bin/suexec | grep lve
liblve.so.0
lve_jail_uid

Thanks
 

someB0dy

Member
May 24, 2010
22
2
53
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
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.
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
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
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
I just try to change the handler to fcgi with suexec on and i am getting error 503 on my site :(
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
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.
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5

Thanks
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
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.
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
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
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
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.
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
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 ....?
 

iseletsk

Well-Known Member
Verifed Vendor
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.
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
Ok after enabling the mod_lsapi what i must configure in general and what i must configure for this problem?

Thanks
 

mtindor

Well-Known Member
Sep 14, 2004
1,458
112
193
inside a catfish
cPanel Access Level
Root Administrator
Ok after enabling the mod_lsapi what i must configure in general and what i must configure for this problem?

Thanks
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
 

ASTRAPI

Well-Known Member
Jul 8, 2008
321
0
66
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
 

mtindor

Well-Known Member
Sep 14, 2004
1,458
112
193
inside a catfish
cPanel Access Level
Root Administrator
If i want to use after installation the mod_lsapi global for all domains do i have to add that line on .htaccess?
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.

"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
I'm not a opcode cache guru. I'll defer to somebody else to answer your question.

M
 

kernow

Well-Known Member
Jul 23, 2004
1,020
62
178
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