# Upgrading binaries with USR2 results in two severs running

**URL:** <https://www.ruby-forum.com/t/upgrading-binaries-with-usr2-results-in-two-severs-running/198542>\
**Category:** NGINX\
**Created:** [November 3, 2010, 8:24am UTC](https://www.ruby-forum.com/t/upgrading-binaries-with-usr2-results-in-two-severs-running/198542 "2010-11-03T08:24:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [November 3, 2010, 8:24am UTC](https://www.ruby-forum.com/t/upgrading-binaries-with-usr2-results-in-two-severs-running/198542/1 "2010-11-03T08:24:10Z")

</div>

Shouldent the original process die after it starts the new process? I  
see another server start up, but the old one hang around:

Log:  
2010/11/03 07:16:41 [notice] 54825#0: signal 12 (SIGUSR2) received,  
changing binary  
2010/11/03 07:16:41 [notice] 54825#0: changing binary  
2010/11/03 07:16:41 [notice] 54825#0: start new binary process 54951  
2010/11/03 07:16:41 [notice] 54951#0: using the “epoll” event method  
2010/11/03 07:16:41 [notice] 54951#0: getrlimit(RLIMIT\_NOFILE):  
1024:1024  
2010/11/03 07:16:41 [notice] 54951#0: start worker processes  
2010/11/03 07:16:41 [notice] 54951#0: start worker process 54952  
2010/11/03 07:16:41 [notice] 54951#0: start worker process 54953

Before:

# ps -ef | grep nginx

root 54825 1 0 18:09 ? 00:00:00 nginx: master process  
/opt/local/contrib/sbin/nginx -p /var/log/nginx  
www-data 54932 54825 0 18:15 ? 00:00:00 nginx: worker process

www-data 54933 54825 0 18:15 ? 00:00:00 nginx: worker process

After:

# ps -ef | grep nginx

root 54825 1 0 18:09 ? 00:00:00 nginx: master process  
/opt/local/contrib/sbin/nginx -p /var/log/nginx  
www-data 54932 54825 0 18:15 ? 00:00:00 nginx: worker process

www-data 54933 54825 0 18:15 ? 00:00:00 nginx: worker process

root 54951 54825 0 18:16 ? 00:00:00 nginx: master process  
/opt/local/contrib/sbin/nginx -p /var/log/nginx  
www-data 54952 54951 0 18:16 ? 00:00:00 nginx: worker process

www-data 54953 54951 0 18:16 ? 00:00:00 nginx: worker process

Posted at Nginx Forum:

> **[upgrading binaries with USR2 results in two severs running](https://forum.nginx.org/read.php?2,147148,147148#msg-147148)**
>
> Shouldent the original process die after it starts the new process? I see another server start up, but the old one hang around: Log: 2010/11/03 07:16:41 \[notice\] 54825#0: signal 12 (SIGUSR2) received, changing binary 2010/11/03 07:16:41 \[notice\]...

---

<div class="post-metadata">

**Author:** ![megamic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecae2f/32.png) [@megamic](https://www.ruby-forum.com/u/megamic)\
**Post date:** [November 3, 2010, 9:50am UTC](https://www.ruby-forum.com/t/upgrading-binaries-with-usr2-results-in-two-severs-running/198542/2 "2010-11-03T09:50:51Z")

</div>

Hello!

On Wed, Nov 03, 2010 at 03:22:53AM -0400, megamic wrote:

> Shouldent the original process die after it starts the new process? I  
> see another server start up, but the old one hang around:

No. It should hang around. Moreever, it should still process  
requests. If you see new binary successfully started up - you are  
free to instruct old process to shutdown (actually, you are free  
to do it even if you don’t see new binary started up - but you  
probably don’t want to).

Maxim D.
