Skip to content

Instantly share code, notes, and snippets.

In PHP-FPM (FastCGI Process Manager), the pm.start_servers directive is part of the pool configuration and determines the number of child server processes that should be created when PHP-FPM starts. PHP-FPM uses a process manager to handle incoming requests and distribute them among a pool of worker processes. The pm.start_servers setting specifically defines the number of child processes that should be created at the beginning to handle incoming requests.

Here's a breakdown of how pm.start_servers works:

  1. Startup: When PHP-FPM starts, it needs to create a certain number of child processes to handle incoming requests. These child processes are responsible for executing PHP scripts.

  2. pm.start_servers: This directive sets the number of child processes that should be created during the startup phase. For example, if pm.start_servers is set to 5, PHP-FPM will spawn 5 child processes when it starts.

  3. Balancing Load: The total number of child processes created includes not only the `pm

In PHP-FPM (FastCGI Process Manager), the `pm.start_servers` directive is part of the pool configuration and determines the number of child server processes that should be created when PHP-FPM starts. PHP-FPM uses a process manager to handle incoming requests and distribute them among a pool of worker processes. The `pm.start_servers` setting specifically defines the number of child processes that should be created at the beginning to handle incoming requests.
Here's a breakdown of how `pm.start_servers` works:
1. **Startup**: When PHP-FPM starts, it needs to create a certain number of child processes to handle incoming requests. These child processes are responsible for executing PHP scripts.
2. **pm.start_servers**: This directive sets the number of child processes that should be created during the startup phase. For example, if `pm.start_servers` is set to 5, PHP-FPM will spawn 5 child processes when it starts.
3. **Balancing Load**: The total number of child processes created includes not only the `pm
In PHP-FPM (FastCGI Process Manager), the `pm.start_servers` directive is part of the pool configuration and determines the number of child server processes that should be created when PHP-FPM starts. PHP-FPM uses a process manager to handle incoming requests and distribute them among a pool of worker processes. The `pm.start_servers` setting specifically defines the number of child processes that should be created at the beginning to handle incoming requests.
Here's a breakdown of how `pm.start_servers` works:
1. **Startup**: When PHP-FPM starts, it needs to create a certain number of child processes to handle incoming requests. These child processes are responsible for executing PHP scripts.
2. **pm.start_servers**: This directive sets the number of child processes that should be created during the startup phase. For example, if `pm.start_servers` is set to 5, PHP-FPM will spawn 5 child processes when it starts.
3. **Balancing Load**: The total number of child processes created includes not only the `pm
@aabed
aabed / slack2iphone.sh
Created July 19, 2022 23:18
Export Slack Members Into Iphone Contacts
export ORG_NAME="Some Company" #change that to your company's name
export SLACK_TOKEN="xoxb-**************************" #Your slack token
curl -L -v -H "Authorization: Bearer $SLACK_TOKEN" "https://slack.com/api/users.list" > contacts.json
cat contacts.json | jq '.members[]?.profile|select(.phone != "")| .real_name+"-"+.phone'| sed 's/\"//g'| while IFS= read -r item; do echo "BEGIN:VCARD\nVERSION:3.0\nFN:${item%-*}\nTEL;TYPE=CELL:${item#*-}\nN:`echo ${item%-*}| awk '{if ($3){ print $3";"$1";"$2} else {print $2";"$1}}'`;;;\nitem1.ORG:${ORG_NAME}\nitem1.X-ABLabel:unknown\nCATEGORIES:myContacts\nEND:VCARD" ; done> contacts.vcf
@aabed
aabed / replay.sh
Created May 14, 2021 13:38
Test Github Actions With Force Push
function replay() {
git add .;git commit --amend -m "testing pipeline";git push origin $(git branch --show-current) -f;sleep 5;gh run list | grep $(git branch --show-current)| head -n1 |awk '{print $NF}' |xargs -I {} gh run view {} | tail -1
}
@aabed
aabed / dirty_sg_scanner.py
Last active August 23, 2020 13:56
dirty_sg_scanner
import boto3
response = ec2.describe_security_groups()
groups=set()
for sg in response.get('SecurityGroups'):
for rule in sg.get('IpPermissions'):
for cidr in rule.get('IpRanges'):
if cidr.get('CidrIp') == '0.0.0.0/0':
groups.add(sg.get('GroupId'))
print(groups)
@aabed
aabed / emoji-unicode-ranges
Created March 18, 2020 18:22
emoji unicode ranges
unicode_ranges=[('0x23', '0x24'), ('0x2a', '0x2b'), ('0x30', '0x3a'), ('0xa9', '0xaa'), ('0xae', '0xaf'), ('0x200d', '0x200e'), ('0x203c', '0x203d'), ('0x2049', '0x204a'), ('0x20e3', '0x20e4'), ('0x2122', '0x2123'), ('0x2139', '0x213a'), ('0x2194', '0x219a'), ('0x21a9', '0x21ab'), ('0x231a', '0x231c'), ('0x2328', '0x2329'), ('0x2388', '0x2389'), ('0x23cf', '0x23d0'), ('0x23e9', '0x23f4'), ('0x23f8', '0x23fb'), ('0x24c2', '0x24c3'), ('0x25aa', '0x25ac'), ('0x25b6', '0x25b7'), ('0x25c0', '0x25c1'), ('0x25fb', '0x25ff'), ('0x2600', '0x2605'), ('0x260e', '0x260f'), ('0x2611', '0x2612'), ('0x2614', '0x2616'), ('0x2618', '0x2619'), ('0x261d', '0x261e'), ('0x2620', '0x2621'), ('0x2622', '0x2624'), ('0x2626', '0x2627'), ('0x262a', '0x262b'), ('0x262e', '0x2630'), ('0x2638', '0x263b'), ('0x2640', '0x2641'), ('0x2642', '0x2643'), ('0x2648', '0x2654'), ('0x265f', '0x2661'), ('0x2663', '0x2664'), ('0x2665', '0x2667'), ('0x2668', '0x2669'), ('0x267b', '0x267c'), ('0x267e', '0x2680'), ('0x2692', '0x2698'), ('0x2699', '0x26
@aabed
aabed / ipassign
Created November 8, 2017 11:34 — forked from jsianes/ipassign
Script to assign Public IP from Elastic IP pool for instances hosted in AWS. 'ec2-utils' and AWS CLI packages required. Instance role or access keys need to allow at least next EC2 actions: describe-addresses, associate-address and disassociate-address. Shell script is designed to be integrated with instance start-up
#!/bin/bash
# chkconfig: 2345 99 10
# description: Set Public IP from ElasticIP pool during instance startup
# processname: ipassign
# Provides: ipassign
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set Public IP from ElasticIP pool during instance startup
FROM python:2.7-alpine
ADD envconsul /usr/bin
ADD app.py /app.py
ADD requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
ENTRYPOINT ["envconsul","-consul", "myconsulserver.example.com","-prefix","/"]
CMD ["python","/app.py"]
FROM python:2.7-alpine
RUN wget https://releases.hashicorp.com/envconsul/0.6.1/envconsul_0.6.1_linux_amd64.zip&&unzip envconsul_0.6.1_linux_amd64.zip\
&& ln -sf $PWD/envconsul /usr/local/bin
ADD app.py /app.py
ADD requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
ENTRYPOINT ["envconsul","-consul", "myconsulserver.example.com","-prefix","/"]
CMD ["python","/app.py"]