How to increase the stack size for php?

When checking system in Bitrix provides:5a34c61309ead483543084.jpeg5a34c6446ac70246863481.jpeg5a34c66db1ee9259026556.jpeg
If I check with console
# web1 su --shell /bin/bash --command "ulimit -s"
100000

Created a file with this content:
<?php 
echo shell_exec('ulimit -s'); 
echo shell_exec('echo $USER');
?>

Execute it from the console:
# web1 su --shell /bin/bash --command "php test1.php"
Cannot load Zend OPcache - it was already loaded
100000
web1

Open it in the browser:
8192
web1

I understand it is php-fpm somewhere limits me. But that's just where you set this restriction, I do not understand. Please kick in the right direction.
Thank you all for your time.

New inputs after me in the answer sent a reference
https://clite.ru/articles/bitrix/bitrixenv-linux/r...
And I did what is written in it, when you open the page via web showed
unlimited
web1

That's just checking the system still swears Bitrix to Bitrix nothing has changed. Tell me what I'm doing wrong?
June 10th 19 at 14:37
2 answers
June 10th 19 at 14:39
Solution
Maybe this will help: antonov-dev.ru/blog/4
And this: https://clite.ru/articles/bitrix/bitrixenv-linux/r...
I remember the painfully long set up the server, but still set up(though Ubuntu was). And then went and forgot about Bitrix, how about a nightmare.
I just did what is written in the first link, but the second I opened. - keara_Mosciski commented on June 10th 19 at 14:42
Opened the second link, and lo and behold in my browser shows
unlimited
web1

That's just an error from Bitrix did not go))) - keara_Mosciski commented on June 10th 19 at 14:45
,
Remove the limit on the stack size on Linux in the Apache startup script call:
ulimit-s unlimited

In our case, Apache is not present. Perhaps this can be done when the service starts php-fpm.
You'll suffer to set pretty URLs for Bitrix to NGINX. Can not suffer and take them from the virtual machine? - Baylee_Kulas commented on June 10th 19 at 14:48
here even the Toaster was discussed: How to increase the php stack size (>8192)? - Baylee_Kulas commented on June 10th 19 at 14:51
You'll suffer to set pretty URLs for Bitrix to NGINX. Can not suffer and take them from the virtual machine?

Suffer?, there are 2 lines in config to add), what kind of torment it)), anguish is their virtual machine which does not give a normal performance. Deployed virtual machine Bitrix and on the same VPS deployed OS give me the difference in performance on the assessment Bitrix at least 2 times. And if we talk about feelings, 3: 4). Why should I use their stuff) - keara_Mosciski commented on June 10th 19 at 14:54
, well, well. You are only in the beginning, and I all went to a real store with a huge attendance. With the URLs out there will have some trouble. Caching baikovoe already natrualy? No? You still all ahead. - Baylee_Kulas commented on June 10th 19 at 14:57
, ))) I've set up this(not in the sense that I was struggling with tuning for a long time, but in the sense that for a long time already in this thread and set up a bunch of servers). Not one store, I have a lot of customers. Always scored on that fail to check, and here decided to understand. Moreover, not only the caching is configured. The Bitrix is composite, and it can be given via Nginx without a request in php, so I also set up. No problems and this restriction in fact does not interfere. I just want to figure out how to remove it. - keara_Mosciski commented on June 10th 19 at 15:00
to change the test script Bitrix, obviously. ))) - Baylee_Kulas commented on June 10th 19 at 15:03
yeah and the speed of your site from changing the script also increases, right? ))) In General, the stack has increased, but Bitrix is ignore. Fuck him. Your answer helped, thanks. - keara_Mosciski commented on June 10th 19 at 15:06
June 10th 19 at 14:41
I'd looked for a global search the entire Bitrix for the phrase at least "recursion_limit" where it tests the limit of recursion, maybe he's in another place looking?
what else?) Well, even if he looks to another, I don't care about their internal jambs. Stack increased, the question is closed. Thank you for your time. - keara_Mosciski commented on June 10th 19 at 14:44

Find more questions by tags DebianNginxLinuxPHPPHP-FPM