Periodic restart using fcgid and Apache
Added by Francois van Heerden almost 11 years ago
I've succesfully deployed my application using mod_fcgid and Apacahe 2. However, the application seems to restart every 2 minutes, even if there are active sessions, and I can't find any (obvious) errors in the apache logs (attached below). Is there
some setting I'm missing either in apacahe.conf or fcgid.conf? Changing FcgidConnectTimeout and FcgidIOTimeout does not seem to work.
[2014-Jun-10 11:16:50.426440] 1980 - [info] "WServer/wtfcgi: Caught SIGTERM"
[2014-Jun-10 11:16:50.426494] 1980 - [info] "WebController: shutdown: stopping sessions."
[2014-Jun-10 11:16:50.438638] 2002 - [info] "WServer/wtfcgi: initializing relay server"
[2014-Jun-10 11:16:50.438950] 2002 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '/var/www/wt/libex.wt')"
[2014-Jun-10 11:16:50.439170] 2002 - [info] "wtfcgi: spawned session process: pid = 2003"
[2014-Jun-10 11:16:50.439250] 2002 - [info] "wtfcgi: reading FastCGI stream from stdin"
[2014-Jun-10 11:16:50.452007] 2003 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '/var/www/wt/libex.wt')"
[2014-Jun-10 11:16:50.452304] 2003 - [info] "WServer/wtfcgi: initializing shared wtfcgi session process"
[2014-Jun-10 11:16:50.540526] 2003 - [info] "Wt: session created (#sessions = 1)"
[2014-Jun-10 11:16:50.540703] 2003 [/wt/libex.wt tRpNZNZvSiGeg4b8] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.76.4 (KHTML, like Gecko) Version/7.0.4 Safari/537.76.4"
[2014-Jun-10 11:16:50.540773] 2003 [/wt/libex.wt tRpNZNZvSiGeg4b8] [info] "Wt: signal from dead session, sending reload."
[2014-Jun-10 11:16:50.541070] 2003 [/wt/libex.wt tRpNZNZvSiGeg4b8] [info] "WebRequest: took 0.765ms"
[2014-Jun-10 11:16:50.541195] 2003 [/wt/libex.wt tRpNZNZvSiGeg4b8] [info] "Wt: session destroyed (#sessions = 0)"
[2014-Jun-10 11:16:50.552756] 2003 - [info] "Wt: session created (#sessions = 1)"
[2014-Jun-10 11:16:50.552890] 2003 [/wt/libex.wt OcRk4MvQ0kEyUXr3] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.76.4 (KHTML, like Gecko) Version/7.0.4 Safari/537.76.4"
[2014-Jun-10 11:16:50.553682] 2003 [/wt/libex.wt OcRk4MvQ0kEyUXr3] [info] "WebRequest: took 1.159ms"
[2014-Jun-10 11:16:51.605620] 2024 - [info] "WServer/wtfcgi: initializing relay server"
[2014-Jun-10 11:16:51.605943] 2024 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '/var/www/wt/libex.wt')"
[2014-Jun-10 11:16:51.606181] 2024 - [info] "wtfcgi: spawned session process: pid = 2025"
[2014-Jun-10 11:16:51.606260] 2024 - [info] "wtfcgi: reading FastCGI stream from stdin"
[2014-Jun-10 11:16:51.608171] 2003 [/wt/libex.wt OcRk4MvQ0kEyUXr3] [warning] "WContainerWidget: addWidget(): reparenting widget"
[2014-Jun-10 11:16:51.612323] 2003 [/wt/libex.wt OcRk4MvQ0kEyUXr3] [info] "WebRequest: took 1024.91ms"
[2014-Jun-10 11:16:51.614866] 2003 [/wt/libex.wt OcRk4MvQ0kEyUXr3] [info] "WebRequest: took 7.838ms"
[2014-Jun-10 11:16:51.619630] 2025 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '/var/www/wt/libex.wt')"
[2014-Jun-10 11:16:51.619788] 2025 - [info] "WServer/wtfcgi: initializing shared wtfcgi session process"
[2014-Jun-10 11:16:51.974272] 2003 [/wt/libex.wt OcRk4MvQ0kEyUXr3] [info] "WebRequest: took 2.91ms"
[2014-Jun-10 11:18:54.691503] 2024 - [info] "wtfcgi: shutdown (caught SIGTERM)"[2014-Jun-10 11:18:54.691520] 2002 - [info] "wtfcgi: shutdown (caught SIGTERM)"
[2014-Jun-10 11:18:54.691639] 2025 - [info] "WServer/wtfcgi: Caught SIGTERM"[2014-Jun-10 11:18:54.691652] 2003 - [info] "WServer/wtfcgi: Caught SIGTERM"
[2014-Jun-10 11:18:54.691716] 2025 - [info] "WebController: shutdown: stopping sessions."[2014-Jun-10 11:18:54.691716] 2003 - [info] "WebController: shutdown: stopping sessions."
Replies (1)
RE: Periodic restart using fcgid and Apache - Added by Koen Deforche almost 11 years ago
Hey,
I think you are looking in the right direction though: the server is probably terminating the process or restarting it periodically.
To avoid problems with web servers behaving like this, I tend to favor using spawn-fcgi these days.
See also http://itkia.com/external-fastcgi-with-apache/ and http://redmine.webtoolkit.eu/projects/wt/wiki/Fastcgi_on_nginx
Regards,
koen