A failed PHP-FPM restart is usually a symptom, not the cause. Identify the exact systemd unit and PHP-FPM binary, read the first specific error in the current-boot journal, run that binary’s configuration test, and then correct the named problem. The usual blockers are invalid pool configuration, duplicate listeners, a socket path or permission mismatch, missing runtime directories, an unwritable PID or log path, or an old process still holding the listener. Restart only after the test passes, then verify the service, socket, and a local PHP request.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Find the exact PHP-FPM unit and binary first
PHP-FPM is not installed under one universal name. Package versions and distributions commonly expose units such as a versioned php8.2-fpm or an unversioned php-fpm, and the executable may be php-fpm8.2 rather than php-fpm. Running a command against the wrong version can test a different configuration from the one systemd starts.
As an Amazon Associate I earn from qualifying purchases.
-
List installed service definitions:
systemctl list-unit-files | grep -E 'php.*fpm|fpm.*php' -
Find the available executables:
command -v php-fpm php-fpm8.1 php-fpm8.2 php-fpm8.3 2>/dev/null -
Set the discovered names in the commands below. Use the complete unit name, including its version suffix, wherever
<php-fpm-unit>appears.
Before testing, inspect the unit’s actual start command:
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
systemctl cat <php-fpm-unit>
The upstream PHP service template starts FPM in the foreground with --nodaemonize and supplies an explicit --fpm-config file. Read that ExecStart line so your test uses the same binary and configuration path; the template is published at the PHP-FPM service template. A versioned package may include additional arguments, so do not assume the default php-fpm.conf is the file used by your service.
Also check whether the unit is enabled, masked, or replaced by a local drop-in. systemctl cat shows the vendor definition and drop-ins, while systemctl list-unit-files shows whether a unit is enabled or disabled. A disabled unit can still be started manually; a masked unit cannot be started until the mask is removed. Those states are different from a process that starts and then exits, so record the state before changing anything.
Read the first concrete startup error
“Control process exited with error code” only reports that systemd received a failure. The first useful line normally appears earlier in the service output or journal.
sudo systemctl status <php-fpm-unit> --no-pager
sudo journalctl -u <php-fpm-unit> -b --no-pager -n 100
-b limits the journal to the current boot, while -n 100 shows enough context to place the failure in sequence. Start with the earliest concrete FPM message, not the final systemd summary. If the service was restarted repeatedly, later messages may simply repeat the same root cause; scroll to the first occurrence and capture the filename, line number, endpoint, or path it names.
| First specific message | Likely area to inspect |
|---|---|
| Syntax error, unknown directive, cannot include file, or no valid pool section | Global or pool configuration and include paths |
| Address already in use | Duplicate Unix-socket or TCP listen values, or another FPM master |
| Permission denied while creating or opening a socket | listen.owner, listen.group, listen.mode, or parent-directory permissions |
| Unable to write PID file or open error log | Configured path, ownership, free space, or inode exhaustion |
| No such file or directory for a runtime path | A missing /run subdirectory or an incorrect path after boot |
Do not treat an empty systemctl status message as proof that no error exists. FPM can write details to its configured error_log, and a service may fail before the web server logs anything. Read the journal, then inspect the FPM error-log path named in the configuration if the journal does not contain the complete line.
Run the matching configuration test before another restart
Use the exact executable found in the unit. For an unversioned installation:
Free tools Windows power users keep installed
One-click scans. No signup required.
sudo php-fpm -t
For a versioned Debian or Ubuntu installation, an example is:
sudo php-fpm8.2 -t
If systemctl cat shows a non-default configuration argument, pass the same file to the test with the binary’s supported --fpm-config or equivalent option. The test parses the global file and included pool files without starting a second master. Correct the file and line named by the output, then run the test again. Do not proceed to a restart while it still reports an error; one malformed include can prevent FPM from binding any socket.
FPM uses PHP-style php.ini syntax with a global configuration and pool-specific files. A misspelled directive, malformed value, missing include, or pool file without a valid section can stop the master before it creates a listener. A pool file must contain a valid pool section; a file that is present but structurally incomplete is still a startup failure. Repeat the test after each correction until it reports a valid configuration.
Keep vendor-managed files unchanged where possible. Put local service changes in an override created with systemctl edit <php-fpm-unit> instead of editing the packaged unit directly, as recommended by the upstream service template. This keeps distribution updates from silently replacing your local adjustment and makes the effective unit visible as a drop-in. Configuration-file edits should likewise be made in the local pool or include intended for administrator settings, rather than by modifying a package template that may be regenerated.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Fix the failure named in the journal
Duplicate Unix-socket or TCP listeners
Every FPM pool needs a unique listener. Two pools cannot bind the same Unix socket, and two services cannot claim the same TCP address and port. Search all likely configuration trees, then inspect live listeners and processes:
sudo grep -RIn '^s*listens*=' /etc/php* /etc/php-fpm* 2>/dev/null
sudo ss -ltnp
sudo ss -xlpn | grep -i php
ps -ef | grep '[p]hp-fpm'
Compare every pool’s listen = value with the process list. Include files can load pools from more than one directory, so searching only the file you usually edit can miss a second pool. For TCP, compare both address and port; binding 127.0.0.1:9000 is different from another address, but two processes cannot claim the same local endpoint.
If an unintended second master is running, identify its unit first and stop it through systemd. If both pools are required, assign each a different socket path or TCP port and update the corresponding web-server configuration. Do not kill a process merely because its name contains FPM; it may be the active instance serving another site. After changing a listener, rerun the configuration test and verify that the old endpoint is no longer occupied before restarting the intended unit.
Socket path, owner, group, or mode mismatch
For a local web server, the FastCGI target must be exactly the same path as the pool’s listen value. Compare the pool files, web-server configuration, and live filesystem:
sudo grep -RInE '^s*listens*=|^s*listen.(owner|group|mode)s*=' /etc/php* /etc/php-fpm* 2>/dev/null
sudo grep -RInE 'fastcgi_pass|SetHandler|ProxyPassMatch' /etc/nginx /etc/apache2 /etc/httpd 2>/dev/null
ls -l /run/php /run/php-fpm 2>/dev/null
namei -l /run/php/php-fpm.sock 2>/dev/null
The PHP manual documents listen.owner, listen.group, and listen.mode; when those values are not overridden, the documented socket mode is 0660. Set ownership and mode to an account and group that the web server actually uses. A socket can exist and still produce a 502 if one directory component blocks traversal or the web server lacks read/write access. Check the directory permissions as well as the socket’s final mode.
Replace the example path in namei with the real value from your pool. It displays permissions for every component, which helps distinguish a wrong socket mode from a parent directory that the web-server account cannot traverse. Also check for spelling, symlinks, and versioned directory names: /run/php/php8.2-fpm.sock and /run/php/php-fpm.sock are different endpoints even if both appear plausible.
If FPM reports that the parent directory does not exist, remember that /run is a runtime filesystem recreated during boot. Restore the distribution’s tmpfiles or runtime-directory mechanism, or create the directory with the package’s intended owner and mode. Do not solve this by making the directory world-writable. A manually created directory may disappear at the next reboot unless the package’s tmpfiles configuration or service unit recreates it.
PID files, error logs, and filesystem capacity
Messages such as “unable to write PID file,” “cannot open error log,” “No space left on device,” and “Permission denied” identify a prerequisite outside the socket itself. Check both blocks and inodes:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsdf -h
df -i
Then inspect the parent directory and the exact paths named by the global pid and error_log directives. The PHP-FPM configuration manual documents those global directives as well as socket permissions. Ensure the service user can create or append the files, the parent directories exist, and the filesystem has capacity. A full inode table can produce “No space left on device” even when df -h still shows free bytes, which is why both checks matter.
Do not create a replacement PID or log file with arbitrary ownership and expect the problem to be solved. Check which user the unit runs as, inspect the directory’s owner and mode, and preserve the distribution’s intended layout. Remove or rotate files through your normal system administration process; do not grant broad write access to a runtime directory. If a log path points into a directory that is recreated at boot, fix the directory-creation mechanism rather than relying on a one-time manual mkdir.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Stale or conflicting masters
A failed stop can leave an old master running, or a different PHP version can already own the listener. Confirm the service state, process command lines, and sockets before taking action:
sudo systemctl status <php-fpm-unit> --no-pager
ps -ef | grep '[p]hp-fpm'
sudo ss -xlpn | grep -i php
Prefer sudo systemctl stop <php-fpm-unit> followed by a controlled start or restart. Manually terminate a process only after you have matched it to its unit and verified that it is the conflicting instance. A duplicate listener is the reason a new master cannot bind; killing an unrelated master can take another application offline. If multiple PHP versions are installed, inspect each process command line and unit name so that you do not stop the version serving a different virtual host.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Changed systemd units or socket activation
After editing a .service or .socket unit, systemd may still hold the previous definition in memory. Reload the manager, then restart the service:
sudo systemctl daemon-reload
sudo systemctl restart <php-fpm-unit>
daemon-reload is required after unit-file changes; it is not a substitute for fixing an FPM configuration error. If you changed only a pool file, the manager does not need a daemon reload, but FPM still needs a restart or an appropriate graceful reload to read the new pool settings.
When socket activation is used, the socket unit’s ListenStream must match the FPM pool’s listen path. Inspect the socket unit and its state:
systemctl cat <php-fpm-unit>.socket
sudo systemctl status <php-fpm-unit>.socket --no-pager
Enable and start the socket separately only when that socket unit is part of your installation:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →sudo systemctl enable --now <php-fpm-unit>.socket
The systemd socket-activation guide at systemd.io demonstrates the separate socket and service lifecycle. A mismatch between ListenStream and FPM’s pool listener leaves systemd listening on one endpoint while the web server requests another. Do not add a socket unit merely because a guide shows one; many package installations let FPM create its own Unix socket directly.
Choose a Unix socket or TCP listener deliberately
Both transports work, but they solve different deployment problems. The PHP manual recommends a Unix socket when the web server is on the same host. TCP is useful when clients are remote or the web server is separated by a network boundary.
| Decision point | Unix socket | TCP listener |
|---|---|---|
| Where it works | Local processes on the same VPS | Local or remote clients, including a separate web host |
| Access control | Filesystem owner, group, mode, and directory traversal | Address and port exposure; use listen.allowed_clients for TCP client restriction |
| Operational risk | Path must exist after boot and match the web-server target | Port conflicts, firewall rules, and network binding must be correct |
| Typical choice | Preferred for a web server on the same machine | Useful when services are separated by a network boundary |
Changing transport is not a shortcut for a permissions error. If you switch from a socket to TCP, change the pool’s listen value and the web server’s FastCGI target together, then rerun the configuration test and verify the new listener. For TCP, confirm that the address is intentionally reachable and apply listen.allowed_clients when the installation supports it; otherwise an exposed FPM port may accept clients you did not intend to trust.
Restart and verify the complete path
Once the configuration test succeeds and the named filesystem, listener, or unit problem is corrected, restart the discovered unit:
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
sudo systemctl restart <php-fpm-unit>
sudo systemctl is-active <php-fpm-unit>
sudo systemctl status <php-fpm-unit> --no-pager
A successful restart should leave the unit active. Confirm that the expected runtime directory and socket exist and that FPM owns the listener:
ls -l /run/php /run/php-fpm 2>/dev/null
sudo ss -xlpn | grep -i php
Finally, make a local request through the web server:
curl -I http://127.0.0.1/your-php-health-endpoint
Use a health endpoint that is already protected appropriately. If the site still returns HTTP 502, read the web-server error log and note the exact socket path it attempted to open. Compare that path character-for-character with the live FPM socket and the pool’s listen setting. A running FPM service does not prove that the web server is pointing at the right endpoint. If the web server reports “connect() failed,” “No such file,” or “Permission denied,” those words usually distinguish a missing path from an access-control problem.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Do not expose an FPM status page publicly. The PHP status-page documentation warns that status output can reveal request URLs; restrict the endpoint to localhost or trusted clients, as described at the PHP-FPM status-page manual. A local curl test through the web server is sufficient to validate the request path without publishing diagnostic data.
A repeatable troubleshooting sequence
-
Discover the unit and executable instead of guessing version names.
-
Read
systemctl statusandjournalctl -u <unit> -b; write down the first concrete error and every path or endpoint it names. -
Inspect
ExecStartwithsystemctl catand run the same binary’s-ttest against the same FPM configuration file.Recommended Free Tools
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Correct syntax, includes, pool sections, listener conflicts, ownership, runtime directories, PID paths, log paths, or disk capacity as indicated.
-
If a unit file changed, run
systemctl daemon-reload. If a pool or global FPM file changed, rerun the configuration test. -
Restart the intended unit only after the test succeeds, then check its active state, socket, listener, and a local HTTP request.
Best Value
SaleHUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
This order prevents a common cycle: repeatedly restarting a service whose configuration has not been validated, then troubleshooting a secondary 502 without checking whether the socket exists. The first specific error narrows the work; the final socket and local-request checks prove that systemd, FPM, the web server, and the application agree on one working endpoint.
Frequently Asked Questions
Why does PHP-FPM say “control process exited with error code”?
That line is a generic systemd summary, not the root cause. Read the earlier lines from sudo systemctl status <unit> --no-pager and sudo journalctl -u <unit> -b --no-pager -n 100, then run the exact service binary with -t. The first syntax, listener, permission, or filesystem error identifies the repair.
How do I know which PHP-FPM command to test?
Inspect systemctl cat <php-fpm-unit> and its ExecStart line. Use that versioned executable and the configuration file passed with --fpm-config. For example, a service using PHP 8.2 may require sudo php-fpm8.2 -t, not an unversioned php-fpm -t.
Why is PHP-FPM not creating its Unix socket?
First run the matching configuration test. A syntax or pool error can make FPM exit before binding. If the test passes, check for a missing parent directory under /run, an unwritable runtime path, a duplicate listener, or incorrect socket ownership and mode. Compare the pool’s listen value with the live directory and process listings.
What causes a 502 after changing the PHP-FPM socket?
The web server may still point to the old path, or it may lack permission to traverse the socket’s parent directory. Compare the pool’s listen, the web server’s fastcgi_pass, SetHandler, or ProxyPassMatch, and the path in the web-server error log. Then verify the live socket with ls and ss -xlpn.
Recommended Free Tools
Should I use a Unix socket or TCP for a local VPS web server?
A Unix socket is the PHP manual’s preferred choice when the web server is on the same host. It uses filesystem permissions and avoids exposing a network port, but its path and runtime directory must be correct. TCP is useful for a remote or separately hosted web server; restrict clients with listen.allowed_clients where appropriate.
Do I need daemon-reload after every PHP-FPM configuration change?
No. Run systemctl daemon-reload after changing a systemd .service or .socket unit. For changes to FPM global or pool files, rerun the matching -t test and restart or gracefully reload the FPM service as appropriate.
Is it safe to kill every php-fpm process before restarting?
No. A process may belong to another PHP version or site. Use systemctl status, ps, and ss to match the process to its unit and listener. Stop the conflicting unit through systemd; terminate manually only after confirming it is the unintended instance.
Can I make the runtime directory world-writable to fix permission errors?
Do not do that. Restore the distribution’s tmpfiles or runtime-directory setup, or create the directory with the intended service user, group, and mode. Broad write permissions can create a security problem while masking the actual ownership mistake.
The Bottom Line
Fix PHP-FPM in this order: identify the unit and binary, read the first journal error, test the exact configuration with that binary, correct the named listener, socket, permission, runtime, PID, log, or unit problem, and restart only after the test passes. Finish by checking the active service, live socket, listener ownership, and a protected local HTTP request. If a 502 remains, compare the web server’s exact FastCGI path with FPM’s listen value character for character.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




