在我error.log
的 apache 中,我有很多以下输出:
[ 2013-11-03 06:25:03.9381 12225/7f72feaa7740 agents/Watchdog/Main.cpp:440 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/deploy/.rbenv/versions/1.9.3-p429/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/deploy/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/passenger-4.0.5', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '28490', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2013-11-03 06:25:04.0517 12228/7f64e3868740 agents/HelperAgent/Main.cpp:555 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.28490/generation-18/request
[ 2013-11-03 06:25:04.2718 12239/7f13012f7740 agents/LoggingAgent/Main.cpp:271 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.28490/generation-18/logging
[ 2013-11-03 06:25:04.2721 12225/7f72feaa7740 agents/Watchdog/Main.cpp:564 ]: All Phusion Passenger agents started!
[Sun Nov 03 06:25:04 2013] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Nov 03 06:25:04 2013] [notice] Apache/2.2.22 (Ubuntu) Phusion_Passenger/4.0.5 mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
[ 2013-11-03 06:25:37.2513 12228/7f64e3771700 Pool2/Spawner.h:739 ]: [App 12429 stdout]
[ 2013-11-03 06:25:54.3365 12228/7f64e3771700 Pool2/SmartSpawner.h:301 ]: Preloader for /var/www/production/current started on PID 12429, listening on unix:/tmp/passenger.1.0.28490/generation-18/backends/preloader.12429
[ 2013-11-03 06:41:51.1811 12228/7f64e3771700 Pool2/Spawner.h:739 ]: [App 13186 stdout]
[ 2013-11-03 06:42:08.1962 12228/7f64e3771700 Pool2/SmartSpawner.h:301 ]: Preloader for /var/www/production/current started on PID 13186, listening on unix:/tmp/passenger.1.0.28490/generation-18/backends/preloader.13186
最后两行一遍又一遍地重复,大约每 30 分钟一次。我想知道那个输出是什么意思?我有 2 个 Rails 应用程序正在运行,使用 Spree Commerce 作为商店系统,它们使用 New Relic 进行监控,并使用 Apache 2 和Passenger 运行。那么这个 Spawner 的东西是什么意思呢?
此外,我们在错误日志中也有一些 SQL 输出,比如
[ 2013-11-02 15:20:44.1366 23916/7fc8bde20700 Pool2/Implementation.cpp:1174 ]: [App 22784 stdout] D, [2013-11-02T15:20:44.136567 #22784] DEBUG -- : (0.3ms) SELECT COUNT(*) FROM `spree_taxons` WHERE `spree_taxons`.`parent_id` = 6818
我不知道这个输出可能来自哪里。也许 Rails 中的某些东西正在记录到stderr
or stdout
,但 aDEBUG
不应该在生产中。任何想法从哪里开始搜索这些东西?当我在本地机器上启动生产应用程序时,日志文件中没有出现此错误。
谢谢你的帮助!