admin管理员组文章数量:1431720
During deployment I need to update a source code of my web PHP application (more files), but I don't want to lose ANY http requests. Old pending requests could be handled by new source code (let's not worry about compatibility).
I don't think a reload (USR2 signal) of the php-fpm service is sufficient (it's not possible to atomically swap the source code because opcache.revalidate_freq), it probably has to do:
- php-fpm stop
- source code update (mv command)
- php-fpm start,
but in that case nginx doesn't wait for php-fpm to start and starts returning 503 to visitors.
Does anyone know a simple way how to deploy atomically and process 100% of requests?
I have a solution that might work (another server in nginx upstream waiting for php-fpm to start..., configure graceful php-fpm stop...) but it seems complicated.
本文标签: How to deploy atomically on NginxPhpfpm without losing requestsStack Overflow
版权声明:本文标题:How to deploy atomically on Nginx+Php-fpm without losing requests? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745572426a2664125.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论