【问题标题】:Open ACS / Project Open log file size increases too much (huge log size)Open ACS / Project Open 日志文件大小增加太多(巨大的日志大小)
【发布时间】:2015-08-19 10:44:39
【问题描述】:

如何减小 Opject-Opens 日志文件的大小。 ]Project-Open[基于openACS框架,产生大量日志。

一个例子是经常发生的弃用警告。

几天后日志文件大小达到几 GB,这非常烦人,让编辑器非常慢,很难找到重要信息。

我做到了
set debug false
etc/config.tcl

编辑:

开始/usr/lib/aolserver4/bin/nsd -it /web/projop/etc/config.tcl -u projop -g projop

文件:/web/projop/etc/config.tcl

ns_log notice "nsd.tcl: starting to read config file..."

###################################################################### 
#
# Instance-specific settings 
# These default settings will only work in limited circumstances
# Two servers with default settings cannot run on the same host
#
###################################################################### 


# Wait until PostgreSQL has come up...
# Sleep 5 is apparently not enough in certain situations
exec sleep 15


#---------------------------------------------------------------------
# Web server ports. Change to 80 and 443 for production use or
# use "Pound" as a reverse proxy.
# If setting httpport below 1024 then please read comments in file:
# /var/lib/aolserver/service0/packages/etc/daemontools/run
#
set httpport            8000
set httpsport           8443


# The hostname and address should be set to actual values.
# setting the address to 0.0.0.0 means aolserver listens on all interfaces

# set hostname          localhost
set hostname            [ns_info hostname]

# set address           127.0.0.1
set address             "0.0.0.0"

set server              "projop"
set servername          "Sybit and Peers"
set serverroot          "/web/${server}"


# Debug is turned on for demo servers. Please turn off for
# performance critical production installations.
set debug               false

# Which database do you want? postgres or oracle
# The name of the database is the same as the server by default.
set database            postgres
set db_name             $server


# Home directory of AOLserver
set homedir             /usr/lib/aolserver4
set bindir              ${homedir}/bin


# Hard limits for up- and downloads
set max_file_upload_mb  20
set max_file_upload_min 5



###################################################################### 
#
# End of instance-specific settings

【问题讨论】:

    标签: size logfile project-open


    【解决方案1】:

    您的日志文件如此大的原因是您在调试模式下登录。您需要更改以下内容并重新启动 AOLserver。

    在 AOLserver 配置文件中,验证/添加此项

    set debug false
    

    ns/server/${server}/module/nslog 部分中,确保该行存在

    ns_param   debug              $debug
    

    并且,同样在 ns_section ns/parameters 部分,确保已设置

    ns_param   debug              $debug
    

    【讨论】:

    • 是的,我确实重新启动了 AOL 服务器。并立即发布配置。我删除了另一个答案中所说的不推荐使用的标签
    • Thorsten,我已经更新了我的答案。即使您已将 debug 设置为 false,您仍可能需要在 nslog 模块设置中明确设置它
    • @ThorstenNiehues 您需要更多帮助吗?如果此或其他答案对您有帮助并回答了您的问题,请不要忘记接受该答案。
    【解决方案2】:

    我会在 crontab 中放一行来强制 AOLserver 每两个小时左右轮换一次日志:

    1 */2 * * *     /bin/killall -HUP nsd
    

    干杯, 弗兰克

    【讨论】:

      【解决方案3】:

      大多数无用(和大)的日志条目是 openAOL 服务器关于已弃用功能的日志警告。

      因此,第一步是删除 How to remove deprecated warning in log-file of open-ACS, Project-Open 中讨论的已弃用警告

      【讨论】:

        猜你喜欢
        • 2018-07-29
        • 2012-04-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-05-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多