20628


Ruby on
RailsでWebアプリケーションを構築しているのですが、Apacheが非常に不安定であり、数分間アクセスしないだけで、落ちるという状況です。  
エラーログを記載させていただきます。  
もし解決法、思い当たる点等ございましたら、ご教授いただきたく存じます。  
よろしくお願いします。

**OS, Apache, and passenger version**

[code]

    YOSUKESMACBOOKPRO13 /etc/apache2% sw_vers
    ProductName:    Mac OS X
    ProductVersion: 10.11.2
    BuildVersion:   15C50
    
    YOSUKESMACBOOKPRO13 /etc/apache2% passenger -v
    Phusion Passenger 5.0.23
    
    YOSUKESMACBOOKPRO13 /etc/apache2% apachectl -v
    Server version: Apache/2.4.16 (Unix)
    Server built:   Jul 31 2015 15:53:26
    
[/code]

**/var/log/apache2/error_log**

[code]

    [Tue Jan 05 13:14:52.414672 2016] [core:info] [pid 2372] AH00096: removed PID file /private/var/run/httpd.pid (pid=2372)
    [Tue Jan 05 13:14:52.414742 2016] [mpm_prefork:notice] [pid 2372] AH00169: caught SIGTERM, shutting down
    
    [ 2016-01-05 13:14:52.4760 2386/0x70000018a000 age/Cor/CoreMain.cpp:507 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
    [ 2016-01-05 13:14:52.4760 2388/0x700000104000 age/Ust/UstRouterMain.cpp:397 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
    [ 2016-01-05 13:14:52.4761 2388/0x7fff761e5000 age/Ust/UstRouterMain.cpp:467 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
    [ 2016-01-05 13:14:52.4761 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:876 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
    [ 2016-01-05 13:14:52.4761 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 2424, application /Users/BandAppServer/Sites/BandAppServer/InFlames (development)
    [ 2016-01-05 13:14:52.4762 2388/0x700000104000 Ser/Server.h:444 ]: [UstRouter] Shutdown finished
    [ 2016-01-05 13:14:52.4762 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 2440, application /Users/BandAppServer/Sites/BandAppServer/InFlames (development)
    [ 2016-01-05 13:14:52.4762 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 2429, application /Users/BandAppServer/Sites/BandAppServer/ArchEnemy
    [ 2016-01-05 13:14:52.4762 2388/0x70000020a000 Ser/Server.h:758 ]: [UstRouterApiServer] Freed 0 spare client objects
    [ 2016-01-05 13:14:52.4763 2388/0x70000020a000 Ser/Server.h:444 ]: [UstRouterApiServer] Shutdown finished
    [ 2016-01-05 13:14:52.4765 2386/0x70000018a000 Ser/Server.h:758 ]: [ServerThr.1] Freed 128 spare client objects
    [ 2016-01-05 13:14:52.4765 2386/0x70000018a000 Ser/Server.h:444 ]: [ServerThr.1] Shutdown finished
    [ 2016-01-05 13:14:52.4774 2386/0x700000290000 Ser/Server.h:758 ]: [ServerThr.2] Freed 128 spare client objects
    [ 2016-01-05 13:14:52.4774 2386/0x700000290000 Ser/Server.h:444 ]: [ServerThr.2] Shutdown finished
    [ 2016-01-05 13:14:52.4775 2388/0x7fff761e5000 age/Ust/UstRouterMain.cpp:498 ]: Passenger UstRouter shutdown finished
    [ 2016-01-05 13:14:52.4776 2386/0x700000396000 Ser/Server.h:758 ]: [ServerThr.3] Freed 128 spare client objects
    [ 2016-01-05 13:14:52.4777 2386/0x700000396000 Ser/Server.h:444 ]: [ServerThr.3] Shutdown finished
    [ 2016-01-05 13:14:52.4778 2386/0x70000049c000 Ser/Server.h:758 ]: [ServerThr.4] Freed 128 spare client objects
    [ 2016-01-05 13:14:52.4780 2386/0x70000049c000 Ser/Server.h:444 ]: [ServerThr.4] Shutdown finished
    [ 2016-01-05 13:14:52.4782 2386/0x7000005a2000 Ser/Server.h:758 ]: [ApiServer] Freed 0 spare client objects
    [ 2016-01-05 13:14:52.4782 2386/0x7000005a2000 Ser/Server.h:444 ]: [ApiServer] Shutdown finished
    [ 2016-01-05 13:14:52.4784 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 2429, application /Users/BandAppServer/Sites/BandAppServer/ArchEnemy
    [ 2016-01-05 13:14:52.7847 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 2424, application /Users/BandAppServer/Sites/BandAppServer/InFlames (development)
    [ 2016-01-05 13:14:52.7848 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 2440, application /Users/BandAppServer/Sites/BandAppServer/InFlames (development)
    [ 2016-01-05 13:14:53.1069 2386/0x7fff761e5000 age/Cor/CoreMain.cpp:942 ]: Passenger core shutdown finished
    
[/code]


CC BY-SA 3.0
2016-01-05T05:16:23.810
20618
2016-11-16T06:32:58.667
2016-01-05T05:48:00.110
13680
13680
question
macos apache passenger
数分アクセスしないだけでApacheが落ちる。


Automatic Termination という機能があるそうで もしかすると httpd が自動停止されてるかもしれません。  
次のコマンドで Automatic Termination は無効化できるそうなので試してみてはいかがでしょうか。

[code]

    defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
    
[/code]


CC BY-SA 3.0
2016-01-05T08:45:35.010
20628
2016-01-05T08:45:35.010
5008
20618
answer