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

推荐订阅源

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 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? How to fix website not loading issue on VPS server (Nginx + WordPress) | DigitalOcean 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 do I properly zero-downtime deploy a Node.js app on a Droplet? | DigitalOcean
e15185179e44 · 2026-04-26 · via DigitalOcean Community Questions

Hi there,

Good news, PM2 actually handles this natively. You do not need Kubernetes or anything complex for a single Droplet setup.

The simplest fix is using PM2’s reload instead of restart:

pm2 reload app-name

Unlike pm2 restart which kills the process and starts a new one, pm2 reload does a rolling reload. It starts a new instance of your app, waits for it to be ready, then gracefully shuts down the old one. No downtime.

For this to work properly your app needs to handle the SIGINT signal cleanly and stop accepting new connections before exiting:

process.on('SIGINT', () => {
  server.close(() => {
    process.exit(0);
  });
});

If you want to go a step further, PM2 has a built in cluster mode that runs multiple instances of your app and reloads them one by one:

// ecosystem.config.js
module.exports = {
  apps: [{
    name: 'app-name',
    script: 'server.js',
    instances: 'max',
    exec_mode: 'cluster'
  }]
}

Then deploy with:

pm2 reload ecosystem.config.js

Nginx keeps serving requests to the instances that are still up while each one reloads, so users never hit a dead process.

A couple of things to keep in mind:

Make sure your app is stateless or that sessions are stored externally (Redis, database) before enabling cluster mode. In-memory sessions will not work across multiple instances.

If you are doing database migrations as part of your deploy, run those before reloading PM2, not during.

The PM2 docs have a good section on this if you want to go deeper: https://pm2.keymetrics.io/docs/usage/cluster-mode/