惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
WordPress大学
WordPress大学
博客园 - 叶小钗
B
Blog RSS Feed
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Hugging Face - Blog
Hugging Face - Blog
T
Threat Research - Cisco Blogs
B
Blog
V
V2EX
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threatpost
Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
PCI Perspectives
PCI Perspectives
雷峰网
雷峰网
The Register - Security
The Register - Security
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
Security Latest
Security Latest
NISL@THU
NISL@THU
腾讯CDC
S
SegmentFault 最新的问题
小众软件
小众软件
The GitHub Blog
The GitHub Blog
月光博客
月光博客
A
Arctic Wolf
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
IT之家
IT之家
D
DataBreaches.Net
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
News | PayPal Newsroom
L
LINUX DO - 最新话题
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
TaoSecurity Blog
TaoSecurity Blog
P
Privacy International News Feed

DigitalOcean Community Questions

Droplet stuck: "Power on" and "Snapshot" both in Executing state for hours - what are my options? | DigitalOcean Referral Link Not Working anymore | DigitalOcean Recent console change has destroyed capacity to connect to legacy FreeBSD installs | DigitalOcean issue after moving app from aws to digitalocean | DigitalOcean issue after moving app from aws to digitalocean | DigitalOcean Container registry auomated garbage cillection sign in | DigitalOcean Billings And Free Tier Offer | DigitalOcean Switch hostinger to digitalocean? | DigitalOcean Unable to connect to Droplet via Console – “Failed to get droplet info” error | DigitalOcean billing problem | DigitalOcean How do I migrate an old Xen DomU VM, backed by a DRBD volume, to Digital Ocean? | DigitalOcean Account Locked After Payment Method Attempt (Hatch Program) - No Clear Reason | DigitalOcean Ghost Blog Marketplace Droplet is Ubuntu 22.04, not Ubuntu 24.04 | DigitalOcean How to setup browser with openclaw | DigitalOcean unable to load CA private key | DigitalOcean unable to load CA private key.. | DigitalOcean Add additional billing contact | DigitalOcean Digital Ocean Cloud Firewall? | DigitalOcean Mongodb auditing and compliance | DigitalOcean How much you're spending on AI tools? | DigitalOcean I can't create a managed MySQL cluster | DigitalOcean Please unblock SMTP (ports 25/465/587) for my droplet | DigitalOcean Reported promotional profile still accessible on DigitalOcean | DigitalOcean Change DNS server on Ubuntu 24 | DigitalOcean cannot add promotion of github student pack | DigitalOcean Do I need to use a Load Balancer on DigitalOcean for HTTPS or can I handle it on the Droplet? | DigitalOcean Best way to deploy a small Docker app on DigitalOcean without overengineering? | DigitalOcean Why is my DigitalOcean Droplet bandwidth usage so high all of a sudden? | DigitalOcean smtpout.secureserver.net 587 is blocked | DigitalOcean How do I disable AI? | DigitalOcean Is it safe to run production apps on a single DigitalOcean Droplet? | DigitalOcean Should I use Managed PostgreSQL or just run Postgres on my Droplet? | DigitalOcean IPv6 configuration issue | DigitalOcean Account locked after adding payment method | DigitalOcean 403 Forbidden on DigitalOcean App Platform with FastAPI Backend & Streamlit Frontend | DigitalOcean Not able to see access control panel | DigitalOcean Web Hosting Expiration | DigitalOcean When will OpenSearch v3 be available on DigitalOcean Managed Databases? | DigitalOcean Renew Your Hosting Now? | DigitalOcean How are you handling the Axios supply chain attack in your deployments? | DigitalOcean Create a DNS TXT record with multiple lines? | DigitalOcean Report multiple promotional pages | DigitalOcean Request to remove user pages containing unwanted links | DigitalOcean How can developers build a scalable video streaming solution using DigitalOcean? | DigitalOcean Request review of multiple promotional user profiles on DigitalOcean Community | DigitalOcean Can't configure CORS configuration in Spaces Object Storage | DigitalOcean Load Balancers dropping requests with a fixed pattern | DigitalOcean Billing question - payment restored account but droplet had already been purged | DigitalOcean How to Deploy a Django + Next.js Application on DigitalOcean App Platform | DigitalOcean URGENT: GitHub Student Promo stuck - Failed sign-up crash | DigitalOcean How do check my GitHub Student pack credits and Duration? | DigitalOcean Where to Buy Dedicated Server in India | DigitalOcean Android app for DigitalOcean - OceanNex | DigitalOcean how to change password of the droplet's ssh | DigitalOcean How are you backing up your Droplets and databases on DigitalOcean? | DigitalOcean Why am I being charged $14 when adding a payment method if I should receive $200 credit? | DigitalOcean Availability of Dedicated CPU Droplets in AMS3 datacenter | DigitalOcean What’s your typical stack for launching a startup on DigitalOcean? | DigitalOcean Email From my vps | DigitalOcean Can you make it possible to send via SMTP using ports 465 and 587 | DigitalOcean Why the Digital Ocean K8s Cluster provisioning is taking long ( 4 hours and still in progress ) | DigitalOcean Response not successful: Received status code 428 | DigitalOcean Why does the Digital Ocean K8s take long to provision the cluster ( 4 hrs and still in progress ) | DigitalOcean How to setup ssl for Spaces CDN | DigitalOcean How does DigitalOcean afford to give 4TB of bandwidth on a $24 Droplet? Are they losing money? | DigitalOcean Cilium DNS-based egress rules don’t work on DOKS | DigitalOcean Request to unblock outbound port 587 for SMTP | DigitalOcean Registry showing wrong limit | DigitalOcean Cancel Account because no longer needed | DigitalOcean What does your production stack on DigitalOcean look like? | DigitalOcean GitHub education | DigitalOcean OpenClaw Prompt Caching with Gradient AI | DigitalOcean Prompt Caching with OpenClaw and Gradient AI? | DigitalOcean Any discounts or trials going? | DigitalOcean App Platform - update DB pool without detach | DigitalOcean Is Kubernetes overkill for small projects in 2026? | DigitalOcean Report promotional user profiles not aligned with community guidelines | DigitalOcean App Platform: how to make routes add prefix back in case of 301 redirects? | DigitalOcean What are you using to deploy apps to DigitalOcean these days? | DigitalOcean No Response from Digital Ocean Team | DigitalOcean Report promotional user profile not related to DigitalOcean topics | DigitalOcean Droplet NGINX serving old cached content after deploy how to clear cache reliably? | DigitalOcean Is there any problem in getting a VPS service from Digital Ocean and using it from Russia? | DigitalOcean What's your current production setup on DigitalOcean? | DigitalOcean Keeps signing me out (even more frequently than before) | DigitalOcean Unable to Access DigitalOcean Community Page on iOS Safari – Application Error | DigitalOcean How to change existing certbot/nginx to wildcard domain? | DigitalOcean shh add to existing project | DigitalOcean ssl error on my website with cloundpannel | DigitalOcean How do I access bigger machines (more CPU’s and memory).? My current account seems limited. | DigitalOcean Choice of models limited | DigitalOcean Best practices for deploying a Next.js SaaS app with PostgreSQL on DigitalOcean App Platform? | DigitalOcean MOODLE INSTALLATION | DigitalOcean Being charged while adding payment method | DigitalOcean Problems with the OpenClaw droplet | DigitalOcean My account is blocked and i dont know why | DigitalOcean App platform deployment is hanging for almost 1 hour on Build step | DigitalOcean Deploying a Letter Boxed-Style Word Puzzle Game on DigitalOcean — Best Practices & Deployment Questions | DigitalOcean How do I safely give my OpenClaw droplet permission to access the internet and LinkedIn for research purposes? | DigitalOcean Intermittent system unresponsiveness requiring reboot on WordPress droplet | DigitalOcean
How to fix website not loading issue on VPS server (Nginx + WordPress) | DigitalOcean
By 511c1785d2404350b53231089c0190 · 2026-04-07 · via DigitalOcean Community Questions

Heya,

When you get a 502 Bad Gateway error, the problem is usually not Nginx itself. Most of the time, Nginx is working, but it cannot get a valid response from the backend service it depends on, which is usually PHP-FPM for WordPress.

For a WordPress site on Nginx + Ubuntu 22.04, the most common causes are:

  • PHP-FPM is down or stuck
  • Wrong PHP-FPM socket/path in the Nginx config
  • PHP worker exhaustion from heavy traffic, bad plugins, or slow requests
  • Timeouts caused by a slow plugin, theme, or external API call
  • Low server memory, causing PHP-FPM or MySQL to crash
  • Less commonly, database issues can make WordPress hang, even if they do not directly trigger every 502

To troubleshoot it, first check the Nginx error log:

sudo tail -f /var/log/nginx/error.log

Or review recent lines with:

sudo tail -n 50 /var/log/nginx/error.log

That log usually tells you whether Nginx failed to connect to PHP-FPM, hit a timeout, or found a bad upstream definition.

Since WordPress runs through PHP, the next important step is to check PHP-FPM logs and status.

First, see which PHP version is installed:

php -v

Then check the PHP-FPM service:

sudo systemctl status php8.1-fpm

On Ubuntu 22.04, the PHP-FPM log is often here:

sudo tail -n 50 /var/log/php8.1-fpm.log

You can also inspect the system journal:

sudo journalctl -u php8.1-fpm -n 50 --no-pager

If PHP-FPM is stopped or failing, restart it:

sudo systemctl restart php8.1-fpm

Also confirm that Nginx is pointing to the correct PHP socket. In your Nginx site config, look for something like:

fastcgi_pass unix:/run/php/php8.1-fpm.sock;

If Nginx points to the wrong PHP version or a missing socket, you can get intermittent 502 errors immediately.

After that, check WordPress/application-level logs. For WordPress, enable debugging in wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Then review:

tail -n 50 /path/to/wordpress/wp-content/debug.log

That helps catch plugin, theme, and PHP fatal errors that do not always appear clearly in the browser.

It is also worth checking whether the server is running out of memory:

free -h
dmesg -T | grep -i -E 'killed process|out of memory'

If PHP-FPM workers are being killed by the OOM killer, the site may alternate between hanging and returning 502.

A practical fix checklist would be:

  1. Check nginx/error.log
  2. Check php-fpm service status and logs
  3. Verify the fastcgi_pass socket/path in Nginx
  4. Enable WordPress debug logging
  5. Check memory usage and OOM events
  6. Temporarily disable heavy or recently added plugins
  7. Reload services after changes:
sudo nginx -t
sudo systemctl reload nginx
sudo systemctl restart php8.1-fpm