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

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

DigitalOcean Community Questions

Error Amount exceeds allowed charge amount No response from Support | DigitalOcean Not receiving the activation email while signing up the account | DigitalOcean No response on ticket 12254625. Unable to pay. | DigitalOcean Is the $200 Students Creditsprogram still available? | DigitalOcean Is the $200 student credits program still available? | DigitalOcean What is the difference between a Droplet snapshot and a backup, and which one should I use? | DigitalOcean Digitalocean APP for Django not update static | DigitalOcean DigitalOcean App Django not update static files | DigitalOcean How do you efficiently manage large file storage and backups in cloud-based systems? | DigitalOcean Nodemailer stopped working after migrating from shared hosting to a DigitalOcean Droplet | DigitalOcean Not see memory usage graph in droplet monitoring | DigitalOcean Can only see "Looks like something went wrong..." | DigitalOcean Billing support question about accidental Tier 2 prepayment with no usage | DigitalOcean My Droplet IP got blacklisted and emails are going to spam | DigitalOcean When will Ubuntu 26.04LTS be released on Digital Ocean? | DigitalOcean Where do I start with DevOps as a beginner on DigitalOcean? | DigitalOcean Morse Code Decoder Fails on Consecutive Spaces and Special Characters | DigitalOcean Is CA_CERT available via the connection pool variable syntax in App Platform? | DigitalOcean New account with GitHub Student Pack credits cannot create Droplets or use Launchpad | DigitalOcean App Platform load balancing | DigitalOcean Issues connecting to valkey using private connection string | DigitalOcean Best Practices for Privacy-First AI Deployment in Enterprise Environments | DigitalOcean student discount problem | DigitalOcean What’s the status of CopyFail patches in shared hosts? | DigitalOcean How to Fix High CPU Usage and Random Restarts in a Dockerized Node.js App on DigitalOcean Droplet? | DigitalOcean Why Is My WWW Domain Not Working While the Main Domain Works Fine? | DigitalOcean Why Is www Not Working While non-www Works Fine? | DigitalOcean Why can't I send emails from my Droplet? Port 25 is blocked | DigitalOcean Account closed by Security team - seeking guidance on retrieving personal source code through proper channels | DigitalOcean How can Canadian students pay tuition fees for universities abroad? | DigitalOcean Digital Ocean uptime | DigitalOcean digital ocean charged $10 but my payment method does not get verified and droplet cannot be activated | DigitalOcean Increased billing cost | DigitalOcean Request for SMTP Reputation Verification and Gmail Delivery Issue – IP 64.227.174.118 | DigitalOcean Request to unblock outbound SMTP ports 465 and 587 | DigitalOcean Change web console default user? | DigitalOcean My account got locked and it is stuck on this https://cloud.digitalocean.com/admin_locked | DigitalOcean Can not access to my projects | DigitalOcean DNS problem on one site today | DigitalOcean new DNS issue today on a website, no changes for many years | DigitalOcean php 8.2 to 8.3 migration | DigitalOcean Function fails to initialize when adding LOG_DESTINATIONS | DigitalOcean CPU Bottleneck | DigitalOcean Forgot to destroy droplet, now have $10 charge – any help? | DigitalOcean How Can I Improve Website Speed and Performance on a DigitalOcean VPS? | DigitalOcean Should I use a Managed Database or run PostgreSQL on a Droplet? | DigitalOcean What SMTP service are you using for transactional emails on your Droplet? | DigitalOcean Please unblock outgoing SMTP ports 587 and 465 for transactional email usage. | DigitalOcean View all droplets with tag | DigitalOcean When will Ubuntu 26.04LTS be made available for Droplets? | DigitalOcean View all droplets with a tag | DigitalOcean Please enable General Purpose and Memory-Optimized droplet access | DigitalOcean Dont have Permissions | DigitalOcean How do I properly zero-downtime deploy a Node.js app on a Droplet? | DigitalOcean Droplet stuck: "Power on" and "Snapshot" both in Executing state for hours - what are my options? | DigitalOcean Web Console in Droplet | DigitalOcean Cloudflare Blocked | DigitalOcean Referral Link Not Working anymore | DigitalOcean App Platform Docker builds broken due to no BuildKit | DigitalOcean firewall_controller: no way to restrict inbound source CIDRs for LoadBalancer services on DOKS (hardcoded to 0.0.0.0/0) | DigitalOcean firewall_controller: no way to restrict inbound source CIDRs for LoadBalancer services on DOKS (hardcoded to 0.0.0.0/0) | DigitalOcean Recent console change has destroyed capacity to connect to legacy FreeBSD installs | DigitalOcean How do I escalate a Cloudways support ticket that's being ignored? | DigitalOcean Why does my Droplet show high CPU usage even when my app is idle? | DigitalOcean no way to restrict inbound source CIDRs for LoadBalancer services on DOKS (hardcoded to 0.0.0.0/0) | DigitalOcean Looking for Best SMTP Server for Bulk Email | DigitalOcean My Droplet's disk is full but I can't find what's taking up the space VPS for my WordPress | DigitalOcean Ports 80 and 443 blocked after droplet reboot | DigitalOcean How do I set up automatic Droplet backups and are they enough for disaster recovery? | DigitalOcean issue after moving app from aws to digitalocean issue after moving app from aws to digitalocean | DigitalOcean Can I run multiple websites on a single Droplet? | 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 billing problem How do I migrate an old Xen DomU VM, backed by a DRBD volume, to Digital Ocean? Account Locked After Payment Method Attempt (Hatch Program) - No Clear Reason Ghost Blog Marketplace Droplet is Ubuntu 22.04, not Ubuntu 24.04 | DigitalOcean How to setup browser with openclaw unable to load CA private key | DigitalOcean unable to load CA private key.. | DigitalOcean Add additional billing contact | DigitalOcean Digital Ocean Cloud Firewall? Mongodb auditing and compliance How much you're spending on AI tools? I can't create a managed MySQL cluster Please unblock SMTP (ports 25/465/587) for my droplet Reported promotional profile still accessible on DigitalOcean Change DNS server on Ubuntu 24 cannot add promotion of github student pack Do I need to use a Load Balancer on DigitalOcean for HTTPS or can I handle it on the Droplet? Best way to deploy a small Docker app on DigitalOcean without overengineering? Why is my DigitalOcean Droplet bandwidth usage so high all of a sudden? smtpout.secureserver.net 587 is blocked How do I disable AI? Is it safe to run production apps on a single DigitalOcean Droplet? Should I use Managed PostgreSQL or just run Postgres on my Droplet?
How to fix website not loading issue on VPS server (Nginx + WordPress) | DigitalOcean
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