Skip to content

Instantly share code, notes, and snippets.

View lform-design's full-sized avatar

lform-design

View GitHub Profile
@lform-design
lform-design / php-pools.md
Last active January 27, 2021 17:23 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@lform-design
lform-design / valet-502-errors.md
Created March 27, 2020 18:25
Fixing 502 Bad Gateway Errors on Valet with Nginx

Fixing 502 Bad Gateway Errors on Valet with Nginx

This error is usually caused by AJAX calls, and is due to there being too much data in the request for Nginx to process with its current settings.

  1. Create ~/.config/valet/nginx/all.conf with the following:

     proxy_buffer_size 4096k;
     proxy_buffers 128 4096k;
     proxy_busy_buffers_size 4096k;