Answer the question
In order to leave comments, you need to log in
How to increase php stack size (>8192)?
there is a bunch of ubuntu 14.04 + nginx (openresty) + php-fpm
32 gb memory , you
need to increase pcre.recursion_limit, and accordingly the default stack is not enough for heavy pcre.
Let's say php workers run as user phpuser
Let's get started:
/etc/security/limits.conf
phpuser - stack -1
root - stack -1
~ # su phpuser --shell /bin/bash --command "ulimit -s"
unlimited
<?php
echo shell_exec('ulimit -s');
// 8192
?>
Answer the question
In order to leave comments, you need to log in
Guys!
recursion_limit is not the stack size .
php.net/manual/ru/pcre.configuration.php
---
The solution so far is this: Elbek Azimov
has : on Debian
limits.conf
* - stack -1
@* - stack -1
&
add at the end of /etc/pam. d/common-session
session required pam_limits.so
----
I have: Ubuntu 14.04 Lts 64 minimal
via /etc/init.d/php5-fpm Commented out the
if init_is_upstart;
Added to do_start()
ulimit -s unlimited
removed old update-rc.d -f php5-fpm remove
removed /etc/init/php5-fpm.conf
updated update-rc.d php5-fpm defaults
In php version > 7.0 disable pcre.jit=0 and it will work.
Enabled by default pcre.jit=1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question