Reputation: 7748
For upgrading a site running nginx/php, we're following something similar to:
server {
...
location / {
if (-f /siteroot/maintenance_on.html) {
return 503;
}
...
}
# Error pages.
error_page 503 /maintenance_on.html;
location = /maintenance_on.html {
root /siteroot/glucosetracker/;
}
...
}
My question is, after I create maintenance_on.html, how can I wait for any outstanding PHP connections to close?
Upvotes: 1
Views: 84
Reputation: 454
You can use netstat in a script to test for open connections and loop until they are closed before performing maintenance. Or forcefully close them.
Upvotes: 1