Free tools Windows power users keep installed
One-click scans. No signup required.
When PHP-FPM will not restart, the message control process exited with error code is only a summary. The useful clue is normally the first specific error in the service status or boot journal. Identify the exact PHP-FPM unit and binary, test that binary’s configuration, correct the named problem, 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.
On most Linux VPSs, failures come from a malformed or missing configuration include, duplicate listen endpoints, a socket path or permission mismatch, an unwritable PID or log path, a missing runtime directory, or an older FPM process still holding the socket. The commands below are safe when you substitute the unit and binary actually installed on your server.
As an Amazon Associate I earn from qualifying purchases.
1. Identify the PHP-FPM unit and binary first
Service names and executable names depend on the distribution and installed PHP version. A Debian or Ubuntu host may use a versioned unit such as php8.2-fpm.service; another package may expose php-fpm.service, a templated unit, or a different version. Do not assume that the command php-fpm tests the configuration used by systemd.
-
List installed units that look like PHP-FPM:
systemctl list-unit-files | grep -E 'php.*fpm|fpm.*php' -
Find available binaries:
command -v php-fpm php-fpm8.1 php-fpm8.2 php-fpm8.3 2>/dev/null -
Set shell variables to the names you found. This example uses a common versioned installation; replace both values with yours:
#1 Best Overall
SaleTOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
UNIT=php8.2-fpm.service
FPM_BIN=php-fpm8.2
Read the unit before testing. The upstream PHP service template starts FPM in the foreground with --nodaemonize and supplies an explicit --fpm-config path. Inspect that command so your test uses the same configuration file:
sudo systemctl cat "$UNIT"
If the unit’s ExecStart points to a configuration file different from the binary’s default, test it explicitly:
sudo "$FPM_BIN" -t -y /path/from/ExecStart/php-fpm.conf
The template maps ExecReload to USR2, which is a graceful reload rather than a full stop/start. The service definition and its recommended override method are documented in the upstream PHP-FPM service template.
2. Read the first concrete error, not the restart summary
Run the status command and then the boot’s recent journal entries:
sudo systemctl status "$UNIT" --no-pager
sudo journalctl -u "$UNIT" -b --no-pager -n 100
Look from the oldest relevant line toward the later “failed” or “control process exited” line. The first named file, directive, address, permission, or filesystem error usually identifies the root cause. If the journal is too short, increase -n 100; do not treat a generic exit code as a diagnosis.
Before trying another restart, run the configuration check with the same version used by the unit:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemssudo "$FPM_BIN" -t
For a typical versioned package, that is equivalent to:
sudo php-fpm8.2 -t
Repeat the test after each correction. A successful syntax test means FPM can parse its configuration; it does not by itself prove that the socket is reachable or that the web server is pointing to it.
3. Fix configuration, include, and pool errors
FPM uses php.ini-style syntax with global directives and one or more pool files. A missing include, misspelled directive, malformed value, or pool file without a valid section can make the master exit before it creates a socket. The configuration directive definitions are in the PHP-FPM configuration manual.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
- Run the matching
-tcommand and record the exact file and line it reports. - Open that file and correct the spelling, value format, include path, or pool section named in the error.
- Check that every included file exists and is readable by the service account.
- Run the same test again until it reports a successful configuration test.
- Restart only after the test passes:
sudo systemctl restart "$UNIT"
Keep vendor-managed configuration files intact where possible. For local service changes, use a systemd drop-in instead of editing the packaged unit directly:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →sudo systemctl edit "$UNIT"
After saving a drop-in, systemd normally notices the change through the edit command. If you manually changed a .service or .socket file, explicitly reload unit definitions before restarting:
sudo systemctl daemon-reload
sudo systemctl restart "$UNIT"
4. Resolve “Address already in use”
An “address already in use” message means another pool or process already owns the endpoint FPM is trying to bind. Two pools cannot use the same Unix socket, and two services cannot listen on the same TCP address and port.
Search every likely pool directory for listeners:
sudo grep -RIn '^s*listens*=' /etc/php* /etc/php-fpm* 2>/dev/null
Check TCP and Unix listeners and identify running FPM masters:
sudo ss -ltnp
sudo ss -xlpn | grep -i php
ps -ef | grep '[p]hp-fpm'
Compare each configured listen value with the process shown by ss. Typical fixes are:
- Disable an unintended duplicate pool.
- Give each pool a unique Unix-socket path or TCP port.
- Stop a second service that is running the same PHP version.
- Use the service manager to stop the intended unit before starting it again.
Do not kill a process merely because its name contains php-fpm. First identify its unit and confirm that it is the conflicting instance. The troubleshooting procedure in this PHP-FPM listen-address reference also recommends combining the configuration test, service status, socket listing and ss output.
5. Fix a Unix-socket path or permission mismatch
For a local web server, FPM commonly listens on a Unix socket such as /run/php/php8.2-fpm.sock. Three separate things must agree:
| Layer | What to inspect | Required relationship |
|---|---|---|
| FPM pool | listen = ..., listen.owner, listen.group, listen.mode |
Defines the socket path and who may open it |
| Web server | Nginx fastcgi_pass, Apache SetHandler or ProxyPassMatch |
Must target the exact same path (or the same TCP address and port) |
| Live filesystem | The socket file and every parent directory | Must exist after startup and be traversable by the web-server account |
Inspect all three locations:
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
On Linux, Unix-socket access is controlled by listen.owner, listen.group and listen.mode. The PHP manual documents a default mode of 0660 when these values are not overridden. Set the owner and group to an account and group the web server actually uses, and choose a mode that grants that group access without making the socket world-writable.
A frequent boot-time failure is a missing parent directory under /run. Because /run is a temporary filesystem, a directory that was created manually may disappear at reboot. Restore the package’s tmpfiles or runtime-directory mechanism rather than permanently creating a broadly writable directory. If you must create a missing directory as a recovery step, match the distribution’s service user, group and restrictive mode.
Recommended Free Tools
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
After changing the pool settings, restart FPM and then reload the web server if its configuration changed. A 502 response after a socket edit usually means the web server is still using the old path, the new socket was not created, or directory permissions prevent access.
6. Repair PID, log, and other runtime filesystem failures
Messages such as “unable to write PID file,” “cannot open error log,” “No space left on device,” and “Permission denied” point to a filesystem prerequisite rather than an FPM syntax problem.
-
Check both data space and inode space:
df -h
df -i
-
Inspect the parent directory of the
pidanderror_logpaths named in the configuration:
sudo grep -RInE '^s*(pid|error_log)s*=' /etc/php* /etc/php-fpm* 2>/dev/null
namei -l /path/from/the/error
- Ensure the service account can create or append the file and traverse every parent directory. Correct ownership and mode at the narrowest directory possible.
- Remove or rotate logs only according to your distribution’s logging policy; do not make the directory world-writable as a shortcut.
The global pid and error_log directives, like socket ownership settings, are described in the PHP-FPM configuration documentation.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →7. Deal with a stale or conflicting master process
A failed stop can leave an older master running, or a different PHP version may already own the configured endpoint. Confirm the state before terminating anything:
sudo systemctl status "$UNIT" --no-pager
ps -ef | grep '[p]hp-fpm'
sudo ss -xlpn | grep -i php
Prefer:
sudo systemctl stop "$UNIT"
sudo systemctl start "$UNIT"
Only terminate a process manually after you have identified its unit, verified that it is the conflicting instance, and confirmed that stopping it through systemd is ineffective. Killing an unrelated pool can take down another site on the same VPS.
8. Handle systemd unit edits and socket activation correctly
If you changed a unit file, run daemon-reload before restarting, or systemd may continue using its cached definition:
sudo systemctl daemon-reload
sudo systemctl restart "$UNIT"
Some deployments use socket activation. In that arrangement, the systemd .socket unit’s ListenStream must match the FPM pool’s listen value. Inspect both units:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
sudo systemctl cat php-fpm.socket
sudo systemctl cat "$UNIT"
The socket-activation model starts and enables the socket separately, then checks the service. Follow the sequence documented in systemd’s daemon socket-activation guide:
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
sudo systemctl enable --now php-fpm.socket
sudo systemctl status php-fpm.socket --no-pager
sudo systemctl status "$UNIT" --no-pager
Use the actual socket-unit name on your host. Do not enable socket activation for a package that expects FPM to create and manage its own socket unless its unit files explicitly support that arrangement.
9. Understand restart, reload, and daemon-reload
These commands affect different layers, so using the wrong one can make troubleshooting confusing:
Windows 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 reinstallCrashes, 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 minutesystemctl restartstops and starts the FPM service. Use it after changing pool configuration, socket ownership, or runtime paths.systemctl reloadasks the running master to reread configuration gracefully. The upstream unit maps this operation toUSR2; it is useful when the service is healthy and you want workers replaced without an abrupt stop. It cannot repair a master that never started.systemctl daemon-reloadmakes systemd reread unit files. It is required after manually changing a.serviceor.socketfile, but it does not reload PHP-FPM’s pool configuration.
A safe sequence after a pool edit is php-fpm -t, then systemctl restart. After a unit edit, run daemon-reload first and then restart. If only application code changed, neither operation is normally needed.
10. Choose the right listener: Unix socket or TCP
When both configurations are possible, decide based on topology rather than habit.
| Consideration | Unix socket | TCP listener |
|---|---|---|
| Web server location | Preferred when the web server is on the same host | Useful when clients or the web server are separated by a network boundary |
| Security boundary | Controlled by filesystem owner, group and mode | Controlled by address binding and, where configured, listen.allowed_clients |
| Failure points | Missing runtime directory, wrong path, or directory permissions | Port collision, firewall exposure, or an incorrect address/port |
| Reboot behavior | Requires reliable creation of the parent runtime directory | Requires the configured address and port to be available |
| Operational complexity | Simple locally, but paths must match exactly | More flexible across hosts, with network access controls to maintain |
For TCP, bind only where required and configure listen.allowed_clients when you need to restrict which clients may connect. For a same-host web server, a Unix socket avoids exposing a network listener and is the documented preferred choice in the PHP-FPM manual.
11. Verify the fix end to end
A clean configuration test is only the first checkpoint. Verify the service, endpoint and application in that order:
-
Confirm that systemd considers the unit active:
sudo systemctl is-active "$UNIT"
sudo systemctl status "$UNIT" --no-pager -
Confirm that the expected socket exists and has the intended ownership and mode:
ls -l /run/php /run/php-fpm 2>/dev/null
namei -l /run/php/php-fpm.sock 2>/dev/null -
Confirm that FPM owns the Unix socket or TCP listener:
sudo ss -xlpn | grep -i php
sudo ss -ltnp -
Make a local request to a health endpoint:
curl -I http://127.0.0.1/your-php-health-endpoint
Replace the health path with an endpoint that exists on your application. A local request separates PHP-FPM connectivity from DNS, TLS and external load-balancer issues.
Best Value
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 pool’s listen value and the live socket shown by ls. A mismatch is more actionable than repeatedly restarting the service.
If you enable an FPM status page for diagnostics, restrict it to localhost or trusted clients and remove or protect it afterward. The PHP-FPM status-page manual warns that status output can reveal request URLs; it should not be publicly exposed.
12. A compact recovery checklist
- Find the installed unit with
systemctl list-unit-files. - Find the matching binary with
command -v. - Read
systemctl statusandjournalctl -u UNIT -b; use the first concrete error. - Run the matching binary’s
-ttest before another restart. - Correct syntax, include, pool and file-permission errors until the test passes.
- Search all pools for duplicate
listenendpoints and inspectssoutput. - Make the web server’s FastCGI target identical to the FPM
listenpath. - Restore missing runtime directories through the distribution’s tmpfiles or unit configuration.
- After manual unit edits, run
sudo systemctl daemon-reload. - Verify service state, socket ownership, listener ownership and a local application response.
Frequently Asked Questions
Why does PHP-FPM say “control process exited with error code”?
That line is systemd’s summary, not the root cause. Read systemctl status and journalctl -u <unit> -b, then act on the first specific syntax, include, address, permission, PID, log, or filesystem error.
Which PHP-FPM binary should I test?
Use the binary associated with the installed unit, such as php-fpm8.2 for php8.2-fpm.service. Inspect ExecStart with systemctl cat; if it supplies an explicit configuration path, pass that path to the binary’s -t test.
Why is PHP-FPM not creating its socket?
A configuration error can stop the master before binding. Other common causes are a duplicate listener, a missing parent directory under /run, an unwritable runtime path, or a stale process already owning the endpoint. Run the matching -t test and inspect the journal, pool listeners, processes, and socket directories.
How do I fix a 502 after changing the PHP-FPM socket?
Compare the pool’s listen value, the web server’s fastcgi_pass, SetHandler, or ProxyPassMatch, and the live socket path. They must match exactly, and every parent directory must be traversable by the web-server account.
Should I use reload or restart?
Use reload for a graceful configuration reload when FPM is already healthy; the upstream unit maps it to USR2. Use restart after fixing a failed startup, changing pool settings, or repairing runtime paths. Use daemon-reload only to make systemd reread edited unit files.
Can I delete the old PHP-FPM process manually?
Only after confirming which unit owns it and that it is the conflicting instance. Prefer systemctl stop and systemctl start. Killing an unrelated process can interrupt another pool or website on the VPS.
Is a Unix socket better than TCP for PHP-FPM?
For a web server on the same host, the PHP manual prefers a Unix socket, with access controlled by owner, group, and mode. TCP is useful across hosts or network boundaries; bind it appropriately and use listen.allowed_clients when client restriction is needed.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsHow can I verify that the repair really worked?
Check systemctl is-active, inspect the socket and its permissions, confirm ownership with ss, and make a local request with curl. If the site still returns 502, compare the web-server error log’s attempted path with the live FPM endpoint.
The Bottom Line
Fix PHP-FPM restart failures by identifying the exact unit and binary, reading the first concrete journal error, and running that binary’s configuration test before restarting. Then reconcile pool listeners, socket ownership, runtime directories, PID and log paths, and the web server’s FastCGI target. Finish with service, socket, listener, and local-request checks; a generic restart failure or a clean syntax test alone is not proof that PHP is serving requests.
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.




