thegreenwebfoundation / greencheck-api

The green web foundation API
https://www.thegreenwebfoundation.org/
Apache License 2.0
9 stars 3 forks source link

Split website from api fpm pools #47

Closed arendjantetteroo closed 4 years ago

arendjantetteroo commented 4 years ago

Currently all sites go down if for some reason our workers can't answer for greencheck checks as we saw this morning.

One solution to keep the other sites properly running is making different php fpm pools, so the api is not affecting the others.

arendjantetteroo commented 4 years ago

I've upgraded all running services using php to php7.4 and split up the api pool from the www pool. Now if the api dies, the www pool continues to run so the other sites on this server are not impacted.

For reference, i've used this setup guide: https://gist.github.com/fyrebase/62262b1ff33a6aaf5a54

Just copy the default www.conf file in /etc/php/7.4/fpm/pool.d to api.conf. Change the socket and the listenoing processes.

Current values: listen = /run/php/php7.4-fpm-api.sock pm.max_children = 100 pm.start_servers = 75 pm.min_spare_servers = 50 pm.max_spare_servers = 100