Support Center

Recent questions

About Koken

This Help Center provides support for Koken, a free content management system designed for photographers, artists and designers.

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

[pool www] server reached pm.max_children setting (5), consider raising it

Trent Newton

Jul 06, 2017 09:36PM EDT

Hi,

I keep getting this error in my php7.0-fpm.log file:
[pool www] server reached pm.max_children setting (5), consider raising it.

I'm hosted on Digital Ocean with a 1GB / 1 CPU droplet running with Ubuntu 16.04 with php 7.0-fpm and Nginx 1.10.3 with MariaDB 10.0.29.

The www.conf has the default settings of:
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
;pm.max_requests = 500

I've tried changing the settings, by increasing the numbers, which makes the problem worse with MariaDB constantly crashing.

This is the main server block configuration I have at the moment:

server {
root /var/www/html;
index index.php index.html index.htm;

server_tokens off;
charset utf-8;

# By default, do not set expire headers
expires 0;

# Set expires header for console CSS and JS.
# These files are timestamped with each new release, so it is safe to cache them agressively.
location ~ "console_.*\.(js|css)$" {
expires max;
}

# Catch image requests and pass them back to PHP if a cache does not yet exist
location ~ "^/storage/cache/images(/(([0-9]{3}/[0-9]{3})|custom)/.*)$" {
# Cached images have timestamps in the URL, so it is safe to set
# aggresive cache headers here.
expires max;
try_files $uri /i.php?path=$1;
}

# Catch .css.lens requests and serve cache when possible
location ~ "(lightbox-)?settings.css.lens$" {
default_type text/css;
try_files /storage/cache/site/${uri} /app/site/site.php?url=/$1settings.css.lens;
}

# Catch koken.js requests and serve cache when possible
location ~ koken.js$ {
default_type text/javascript;
try_files /storage/cache/site/${uri} /app/site/site.php?url=/koken.js;
}

# Standard site requests are cached with .html extensions
set $cache_ext 'html';

# PJAX requests contain the _pjax GET parameter and are cached with .phtml extensions
if ($arg__pjax) {
set $cache_ext 'phtml';
}

# Do not check for a cache for non-GET requests
if ($request_method != 'GET') {
set $cache_ext 'nocache';
}

# If share_to_tumblr cookie is preset, disable caching (long story)
if ($http_cookie ~* "share_to_tumblr" ) {
set $cache_ext 'nocache';
}

# Prevent web requests to Koken's .cache files
location ~ .cache$ {
deny all;
}

# Catch root requests
location = / {
try_files /index.html /storage/cache/site/index/cache.$cache_ext @koken;
}

# All other requests get passed back to Koken unless file already exists
location / {
try_files $uri $uri/ /storage/cache/site/${uri} /storage/cache/site/${uri}cache.$cache_ext @koken;
}

location @koken {
try_files /installer.php /app/site/site.php?url=$uri&$args;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include fastcgi.conf;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# pass image processing to another PHP pool
location = /i.php {
try_files $uri =404;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include fastcgi.conf;
}

# Catch albums requests and pass them back to PHP if a cache does not yet exist
location ~ "^/storage/cache/albums(/([0-9]{3}/[0-9]{3})/.*)$" {
# Cached albums have timestamps in the URL, so it is safe to set
expires max;
try_files $uri /a.php?path=$1;
}

location ~ \.php$ {
fastcgi_cache phpcache; # The name of the cache key-zone to use
fastcgi_cache_valid 200 30m; # What to cache: 'Code 200' responses, for half an hour
fastcgi_cache_methods GET HEAD; # What to cache: only GET and HEAD requests (not POST)
add_header X-Fastcgi-Cache $upstream_cache_status; # Add header so we can see if the cache hits or misses
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_param HTTPS 'on';
}

# browser caching of static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|woff|woff2)$ {
expires 7d;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}

And my nginx.conf:

user www-data;
# worker_processes auto;
worker_processes 1;
pid /run/nginx.pid;

events {
use epoll;
worker_connections 1024;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
# keepalive_timeout 2;
types_hash_max_size 2048;
# server_tokens off;

client_max_body_size 100M;
port_in_redirect off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

Any help with this would be great as this has been going on for many months now and would like to see this resolved.

This question has received the maximum number of answers.

support@koken.me
http://assets1.desk.com/
false
koken
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete