Page 4 of 13

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Wed Nov 21, 2018 11:38 am
by maniek015
dpeca wrote:
Wed Nov 21, 2018 8:54 am
You are not pointing nginx directly to php-fpm, as it is described in second post of this thread, right?
no, no, I'm not posting nix to PHP FPM. Just I need pointing NGINX ? :)

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Wed Nov 21, 2018 12:16 pm
by dpeca
Then I don't have idea.
Check error log?

P.S. Yes, nginx should connect to Apache in order to .htaccess works.
I wanted just to be sure you didn't avoid Apache.

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Tue Nov 27, 2018 12:10 pm
by maniek015
@dpeca,
It's probably my fault. My script say me "you don't have mod_rewirte" but mod_rewrite is working properly :)

Can you tell me how I can edit additional parametr like a max_exection_time in .sh file's in template? For example max_input_time - I must add the following line in the .sh or edit php.ini?

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Tue Nov 27, 2018 12:35 pm
by dpeca
maniek015 wrote:
Tue Nov 27, 2018 12:10 pm
Can you tell me how I can edit additional parametr like a max_exection_time in .sh file's in template? For example max_input_time - I must add the following line in the .sh or edit php.ini?
Edit conf file in /etc/php/7.*/fpm/pool.d/ folder and then restart php-fpm service, for example: service php7.2-fpm restart

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Tue Nov 27, 2018 5:56 pm
by maniek015
Yes, thats Ok, but here dont have for example max_input_time - so how Its properly way to add this?

Also I have the small problem - I use PHP-FPM on my cloud service. After the user start 4 download files server return the 503 code, and then 500. When I restart the Apache or php fpm it start work again. Can you any idea where is the problem on the config ? I change the pm.max-children to 75 because default is only 4.

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Tue Nov 27, 2018 6:20 pm
by dpeca
maniek015 wrote:
Tue Nov 27, 2018 5:56 pm
Yes, thats Ok, but here dont have for example max_input_time - so how Its properly way to add this?
Add:
php_admin_value[max_input_time] = 60

or whatever number of seconds...
maniek015 wrote:
Tue Nov 27, 2018 5:56 pm
Also I have the small problem - I use PHP-FPM on my cloud service. After the user start 4 download files server return the 503 code, and then 500. When I restart the Apache or php fpm it start work again. Can you any idea where is the problem on the config ? I change the pm.max-children to 75 because default is only 4.
Not sure what is going on.

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Tue Nov 27, 2018 7:14 pm
by maniek015
Ok I try explain.
I have storage service - when 4 users start download files server return the 503 error, the (after the one minute) return the 500 code (internat server error). If I change to default VestaCP PHP (7.0) the problem not appear. Seems like a limit ? I don’t know what limit on PHP FPM Can handle this ..

I noticed this only in PHP-FPM.

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Tue Nov 27, 2018 8:06 pm
by dpeca
maniek015 wrote:
Tue Nov 27, 2018 7:14 pm
Ok I try explain.
I have storage service - when 4 users start download files server return the 503 error, the (after the one minute) return the 500 code (internat server error). If I change to default VestaCP PHP (7.0) the problem not appear. Seems like a limit ? I don’t know what limit on PHP FPM Can handle this ..

I noticed this only in PHP-FPM.
i'm just watching fpm template, it's based on hosting.tpl except <FilesMatch \.php$> block, which handle only php files.

maybe your downloads goes through php scrpt?

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Wed Nov 28, 2018 4:41 am
by maniek015
Hmm yes, but as I say if I switch the PHP to "default" (PHP 7.0 from Vesta) the problem not appear.

The problem was only PHP-FPM - maybe is there in config some limits to change about which I don't know?

UPDATE :
I increase in config this parametr :
pm.max_children = 4
to
pm.max_children = 75

and user's can download more than 4 files.

What it's safely amount of pm.max_children ? Now with the pm.max_children = 75 i have in one time 20 connections to download and server is stuck. On the default PHP again problem not appear.

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Thu Jan 03, 2019 9:07 pm
by dpeca
maniek015 wrote:
Wed Nov 28, 2018 4:41 am
What it's safely amount of pm.max_children ? Now with the pm.max_children = 75 i have in one time 20 connections to download and server is stuck. On the default PHP again problem not appear.
Probably 150, since it's default apache MaxRequestWorkers.