Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter John.Borovski

    (@johnborovski)

    Ok. That’s embarrassing to speak about own stupid mistakes, but I have to update my previous answer, so that nobody would me misled.

    Main source of WSODs and timeouts is misconfiguration of php-fpm limits:
    pm.max_children – maximum php-fpm child processes, spawned for pool
    pm.start_servers – amount of child processes at start up
    pm.min_spare_servers – min idling childs
    pm.max_spare_servers – max idling childs
    pm.max_requests – requests, handled by child before restart

    You should come up with amount of RAM that can be spared for php-fpm in general, then determine how much is consumed by single child (top will help here; empty process started with 25MB). Childs RAM usage grows while processing requests, so do not stick to minimum value. I suppose pm.max_requests value affects max size process can grow in RAM.
    RAM utilization mentioned on forums, is about 45 MB per process; so if we want to give our php sites ~=1,8 GB RAM, it would be 40 processes.
    An updated config for these conditions below:

    [global]
    
    pid = run/php-fpm.pid
    
    [SITE]
    listen = /var/run/php-fpm.sock
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    
    user = www
    group = www
    
    pm = dynamic
    pm.max_children = 30
    pm.start_servers = 20
    pm.min_spare_servers = 10
    pm.max_spare_servers = 30
    pm.max_requests = 400
    
    slowlog = /var/log/php-slow.log
    request_slowlog_timeout = 5s
    
    env[HOSTNAME] = $HOSTNAME
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp
    
    [OTHER SITE]
    listen = /var/run/php-fpm1.sock
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    
    user = www
    group = www
    
    pm = dynamic
    pm.max_children = 10
    pm.start_servers = 10
    pm.min_spare_servers = 5
    pm.max_spare_servers = 10
    pm.max_requests = 400
    
    slowlog = /var/log/php-slow.log
    request_slowlog_timeout = 5s
    
    env[HOSTNAME] = $HOSTNAME
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp

    Hopefully, that’s it.

    Thread Starter John.Borovski

    (@johnborovski)

    Fix for everyone who faced same or similar problem:

    php-fpm should be configured to pool-per-site model. Example:

    [global]
    
    pid = run/php-fpm.pid
    
    [SITE]
    listen = /var/run/php-fpm.sock
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    
    user = www
    group = www
    
    pm = dynamic
    #pm.max_children = 5
    pm.max_children = 150
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3
    pm.max_requests = 1500
    
    slowlog = /var/log/php-slow.log
    request_slowlog_timeout = 5s
    
    env[HOSTNAME] = $HOSTNAME
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp
    
    [OTHER_SITE]
    listen = /var/run/php-fpm1.sock
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    
    user = www
    group = www
    
    pm = dynamic
    #pm.max_children = 5
    pm.max_children = 150
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3
    pm.max_requests = 1500
    
    slowlog = /var/log/php-slow.log
    request_slowlog_timeout = 5s
    
    env[HOSTNAME] = $HOSTNAME
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp

    Somewhy only jailed installs are affected – out of jail same configs worked fine.

    Thread Starter John.Borovski

    (@johnborovski)

    @realmag777
    Thanks for answer!

    I rechecked on my test installation (both default settings and ‘Currency storage: transient’, and woocommerce + currency switcher (latest versions) work fine, nothing related to switcher in php-slow.log

    It seems, it’s an installation-specific problem, depending on other plugins installed.

    For now I can’t trace the problem, but it’s doesn’t look like currency switcher’s fault anymore.

    Once again thanks.

    Thread Starter John.Borovski

    (@johnborovski)

    @alex Gor
    Awesome!
    Thanks a lot)

    Thread Starter John.Borovski

    (@johnborovski)

    Actually by now I’m somewhat confused. I’ll try to describe taken steps precisely.

    WP version: 4.4.2
    WPGlobus version: 1.4.9
    Easy google fonts version: 1.3.9

    Last test steps and setting:
    1) WPGlobus enabled
    2) theme customization -> typography -> Default Typography -> Paragraphs:
    active font family: Impact
    3) changing active font family to Arial
    changes are shown in preview
    4) saving and exiting customization
    5) refreshing page and reopening customization menu:
    – font did not change on page;
    – settings in default typography paragraphs active font are reverted to Impact.
    6) Disabling WPGlobus
    retaking steps 2)-5)
    results of step 5):
    – font changed to arial;
    – changes in customization menu saved.
    7) enabling WPGlobus and rechecking: changes still there

    This made me think that problem might be somehow connected with multilingual in theme customization menu.

    Thread Starter John.Borovski

    (@johnborovski)

    Thread Starter John.Borovski

    (@johnborovski)

    Sorry, I was mistaking. Problem still there:
    link to images
    I have to reopen this thread.

    Thread Starter John.Borovski

    (@johnborovski)

    You’re right… after plugin update (it was issued less than an hour ago – I noticed and tested it only now) twenty fifteen works fine.

    I guess it’s not a problem of the Team anymore.

    Thread Starter John.Borovski

    (@johnborovski)

    Tested on twenty fifteen, pluto and customized dustland express.

    Can try other themes if needed.

    Forum: Plugins
    In reply to: [WPGlobus] External link

    @tiv.NET INC.

    Great! Thank you for your work!)
    I didn’t even expect that the fix will come up so fast.

    Forum: Plugins
    In reply to: [WPGlobus] External link

    @tiv.NET INC.

    Thanks for response!

    A temporary workaround for anyone who has the same problem is to set default language of your site as of the one referred by the link.

    This will work only if your site has same translations as the one being referred.

    Unfortunately, I’ve entered wrong lang code/locale code at configuration step, so it won’t work for me, unless I find a way to change the codes without loss of translations.

    P.S. Actually, such plugin behavior could be a nice integration feature, if it only could be switched on/off…

    Forum: Plugins
    In reply to: [WPGlobus] External link

    Same problem as described by Dbardaji.

    My site:
    http://ok-led.com.ua/

    The external link is second in the menu and it normally should look like:
    http://td-odeskabel.com.ua/

    In ru translation it changes to:
    http://td-odeskabel.com.ua/ru/

    Excuse me please, if it has been already discussed elsewhere, but it’s the only topic I found.

Viewing 12 replies - 1 through 12 (of 12 total)