Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Smeklinis

Pages: [1]
1
Updates / Re: PHP-FPM Enable
« on: December 13, 2018, 05:42:59 PM »
I have in /opt/alt/php-fpm72/usr/etc/php-fpm.d/users/ conf files for each user. Also nobody.conf. For all files permissions is root:root 0644

In users conf i have this:

[USER]
listen = /opt/alt/php-fpm72/usr/var/sockets/USER.sock
listen.allowed_clients = 127.0.0.1

listen.owner = USER
listen.group = nobody
listen.mode = 0660
user = USER
group = USER

;request_slowlog_timeout = 15s
;slowlog = /opt/alt/php-fpm72/usr/var/log/php-fpm-slowlog-USER.log

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 15s

;listen.backlog = -1
;request_terminate_timeout = 0s
rlimit_files = 131072
rlimit_core = unlimited
catch_workers_output = yes

env[HOSTNAME] = $HOSTNAME
env[TMP] = /home/USER/tmp
env[TMPDIR] = /home/USER/tmp
env[TEMP] = /home/USER/tmp
env[PATH] = /usr/local/bin:/usr/bin:/bin

All "USER" is cwp user in lowercase.

In /opt/alt/php-fpm72/usr/etc/php-fpm.d/users.conf i have:
include=/opt/alt/php-fpm72/usr/etc/php-fpm.d/users/*.conf

USER.sock files in /opt/alt/php-fpm72/usr/var/sockets/ have permissions:

Group: nobody [99]
Owner USER [100*]
0660
"USER" is cwp user in lowercase.

2
CentOS 7 Problems / Re: Average resource usage on Centos7 + CWP ?
« on: December 11, 2018, 09:17:12 AM »
Very strange. One day i have with zero users online ~90% cpu load , next day with 3 users browsing right now :
http://prntscr.com/ltfsju

3
CentOS 7 Problems / Average resource usage on Centos7 + CWP ?
« on: December 08, 2018, 04:05:13 PM »
I am running 2 php websites on 6 core 2.2Ghz and 16Gb ram.
Sites are on identical small php scripts (robocripts csb) , 100mb DB each.
Before i was using tmd shared hosting and these 2 sites has enough power to run.

Now on CWP and on not bad VPS it seems 2 scripts are eating quite a bit of resources.
Apache -> php-fpm 7.2.
About 100 users per day on 2 sites , do you think is it normal:

http://prntscr.com/lsdwec
http://prntscr.com/lsdwti

I have these spikes on each site visit. And on cron run i think (i have 3 and 8 minutes crons for each site).

On idle load:

http://prntscr.com/lsdypx

Can you guys share your servers load ?

4
Updates / Re: PHP-FPM Enable
« on: December 07, 2018, 03:26:04 PM »
Ok
For me php-fpm not worked only on https.

I have added new user and domain in CWP as non SSL and phpinfo shows everything is ok.
What i found: For non SSL version there is /usr/local/apache/conf.d/vhosts.conf and in it is only
IncludeOptional /usr/local/apache/conf.d/vhosts/*.conf
So all vhosts sits in that directory.

For SSL:
/usr/local/apache/conf.d/vhosts-ssl.conf
Here i have all domains in this file, but here is no such line on each domain:

<IfModule proxy_fcgi_module>
      <FilesMatch \.php$>
         SetHandler "proxy:unix:/opt/alt/php-fpm72/usr/var/sockets/USERNAME.sock|fcgi://localhost/"
      </FilesMatch>
   </IfModule>

In /usr/local/apache/conf.d/vhosts/ in each domains vhost (ssl and non ssl) i have that line with php-fpm proxy socket.

I deleted all in vhosts-ssl.conf and put that line in it:
IncludeOptional /usr/local/apache/conf.d/vhosts/*.conf

Restarted Apache.

So now seems php-fpm is working on all domains.

Also i uncommented in httpd.conf LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
But i think this is already done in /usr/local/apache/conf.d/php-fpm.conf

5
Updates / Re: PHP-FPM Enable
« on: December 07, 2018, 02:15:25 PM »
After several days full of reading and experiments i decided to add new user and domain in CWP (with Apache-->>php-fpm config enabled). And what i get :



So going to compare all configs of domains added before php-fpm update to find a bug.

6
Updates / Re: PHP-FPM Enable
« on: December 07, 2018, 11:07:36 AM »
I must say that i add config in  webservers domain config https://prnt.sc/lrolbl  maybe it can help to u.

I did that , i am using apache-->>php-fpm. Can you share your php info screen ?


7
Updates / Re: PHP-FPM Enable
« on: December 06, 2018, 07:43:50 PM »
I enabled Apache -> PHP-FPM with version 7.2, however, when I run phpinfo() function it shows CGI/FastCGI version 5.6. So why PHP-FPM not working?

I also have enabled Apache -> PHP-FPM in Webserver domain Conf. Even I tried using nginx only with php-fpm but it gives 404 error. By the way, i am testing this on freshly installed machine.

Please help me to understand it better.

I have exactly the same problem. I am using apache + php-fpm 7.2.
I think there is problem in permissions - for me seems php-fpm working , but only for root , not for users (i have 3 of them):



Also i can see in CWP dashboard's -Top 5 Process- - when process is running by root it is php-fpm mostly , some times php - and when from other user - php-cgi. And at that time i have big spikes on cpu usage.

I rebuilded all vhosts in Main Conf and Domain Conf.

Here my php info:




Pages: [1]