Oops все же падает ;(
Собрал последнюю CVS версию

Использую gigabase сейчас

Что делать?
Сдается мне какие-то баги все же в oops'e ;(
Памяти - 4 гига и top даже перед смертью показывает что oops где-то мегов
350 использует...

Вот что в логе

Thu Feb 26 09:16:33 2004  [0x12f4129]format_av_pair(): No mem at
send_av_pair.
Thu Feb 26 09:16:35 2004  [0xf90050]fill_mem_obj(): Can't create container.
Thu Feb 26 09:16:35 2004  [0x1be0364]run_client(): Can't create or find
memory object.
Thu Feb 26 09:16:36 2004  [0x19642c5]attach_data(): No mem in attach data.
Thu Feb 26 09:16:36 2004  [0x1d10437]format_av_pair(): No mem at
send_av_pair.
Thu Feb 26 09:16:39 2004  [0x1654201]format_av_pair(): No mem at
send_av_pair.
Thu Feb 26 09:16:39 2004  [0x1bf4369]fill_mem_obj(): Can't create container.
Thu Feb 26 09:16:39 2004  [0x1654201]format_av_pair(): No mem at
send_av_pair.
Thu Feb 26 09:16:39 2004  [0x1654201]attach_data(): No mem in attach data.
Thu Feb 26 09:16:45 2004  [0x138414d]format_av_pair(): No mem at
send_av_pair.

cat oops_statfile

clients      : 1050
uptime       : 68533 sec.
http_requests: 78600
http_hits    : 11626
icp_requests : 0
req_rate     : 97/s
hits_rate    : 19%
free_space   : 99%

Текущий конфиг

proxy:/usr/local/oops # cat oops.cfg
nameserver 213.157.196.130

http_port       3128
icp_port        3130

userid  oops

#logfile                /dev/null
logfile /usr/local/oops/logs/oops.log { 3 1m } unbuffered

accesslog       /dev/null
#accesslog      /usr/local/oops/logs/access.log

pidfile         /usr/local/oops/logs/oops.pid
statistics      /usr/local/oops/logs/oops_statfile

icons-host      213.157.211.130
icons-port      81
icons-path      icons

mem_max         512m
lo_mark         512m
#start_red      0
#refuse_at      0
default-expire-value    30
ftp-expire-value        30
#anon_ftp_passw [EMAIL PROTECTED]
#expiretime     Sun:Sat 0100:0700
max-expire-value        30
last-modified-factor    5
#dont_cache_without_last_modified
default-expire-interval 5
#negative_cache 0
icp_timeout     1000
disk-low-free   0
disk-ok-free    0
force_http11
#always_check_freshness
force_completion 75
maxresident     16m
#minresident    0

insert_x_forwarded_for  yes
insert_via              yes
fetch_with_client_speed yes

#       ACLs - currently: urlregex, urlpath, usercharset
#               port, dstdom, dstdom_regex, src_ip, time
#               each acl can be loaded from file.
##
#acl    CACHEABLECGI    urlregex
http://www\.topping\.com\.ua/cgi-bin/pingstat\.cgi\?072199131826
#acl    WWWPACO         urlregex        www\.paco\.net
#acl    NO_RLH          urlregex        zipper
#acl    REWRITEPORTS    urlregex        (www.job.ru|www.sale.ru)
#acl    REWRITEHOSTS    urlregex        (www.asm.ru|zipper\.paco)
#acl    WINUSER         usercharset     windows-1251
#acl    DOSUSER         usercharset     ibm866
#acl    UNIXUSER        usercharset     koi8-r
#acl    RUS             dstdom          ru su
#acl    UKR             dstdom          ua
#acl    BADPORTS        port            [0:79],110,138,139,513,[6000:6010]
#acl    BADDOMAIN       dstdom          baddomain1.com baddomain2.com
#acl    BADDOMREGEX     dstdom_regex    baddomain\.((com)|(org))
#acl    LOCAL_NETWORKS  src_ip
include:/usr/local/oops/acl_local_networks
#acl    BADNETWORKS     src_ip          192.168.10/24
## WARNING: acl dst_ip is applyed to destination hostname BEFORE
## any redirection used.
#acl    LOCALDST        dst_ip          192.168.10/24
##
#acl    WORKTIME        time            Mon,Tue:Fri 0900:1800
#acl    HTMLS           content_type    text/html
#acl    USERS           username        joe
acl     MSIE            header_substr   user-agent MSIE
acl     ADMINS          src_ip          127.0.0.1
acl     PURGE           method          PURGE
acl     CONNECT         method          CONNECT
acl     SSLPORT         port            443

acl_deny PURGE !ADMINS
acl_deny CONNECT !SSLPORT

##
#  Never cache objects with URL, containing next strings in path
##
stop_cache      ?
stop_cache      cgi-bin
stop_cache      vbs
stop_cache      php
stop_cache      php3
stop_cache      perl

#stop_cache_acl WWWPACO
#refresh_pattern        CACHEABLECGI    20 50% 200
#refresh_pattern        WWWPACO         0 0% 0

#bind_acl       outname1 RUS

#always_check_freshness_acl     HTMLS

local-domain    online.ge

local-networks  10/8 192.168/16

#
# Groups
#
group onlinegetransp    {
        networks        213.157.192.0/19 192.168.0.0/24;
        badports        [0:79],110,138,139,513,[6000:6010] ;
        miss            allow;
        redir_mods      transparent;

        http {
                allow   dstdomain * ;
        }
}

#group  onlinege        {
#       networks        127/8 81.195.15.134/32 ;
#       networks_acl    LOCAL_NETWORKS !BAD_NETWORKS ;
#       badports        [0:79],110,138,139,513,[6000:6010] ;
#       miss            allow;
#
#       http {
#               allow   dstdomain * ;
#       }
#}

group   world   {
        networks        0/0;
        badports        [0:79],110,138,139,513,[6000:6010];
        http {
                deny    dstdomain * ;
        }
        icp {
                deny    dstdomain * ;
        }
}

storage {
        path /srv/proxy/proxydata;
        size 2G;
#       offset  512;
}

storage {
        path /srv/proxy/proxydata1;
        size 2G;
#       offset  512;
}

storage {
        path /srv/proxy/proxydata2;
        size 2G;
#       offset  512;
}

storage {
        path /srv/proxy/proxydata3;
        size 2G;
#       offset  512;
}

storage {
        path /srv/proxy/proxydata4;
        size 2G;
#       offset  512;
}

storage {
        path /srv/proxy/proxydata5;
        size 2G;
#       offset  512;
}

module lang {

        default_charset koi8-r

        # Recode tables and other charset stuff
        CharsetRecodeTable windows-1251 /usr/local/oops/tables/koi-win.tab
        CharsetRecodeTable ISO-8859-5 /usr/local/oops/tables/koi-iso.tab
        CharsetRecodeTable ibm866 /usr/local/oops/tables/koi-alt.tab
        CharsetAgent windows-1251 AIR_Mosaic IWENG/1 MSIE WinMosaic (Windows
(WinNT;
        CharsetAgent windows-1251 (Win16; (Win95; (Win98; (16-bit) Opera/3.0
        CharsetAgent ibm866 DosLynx Lynx2/OS/2
}

module err {
        # error reporting module

        # template
        template /usr/local/oops/err_template.html

        # Language to use when generate Error messages
        lang ru
}

module passwd_file {
        # password proxy-authentication module
        #
        # default realm, scheme and passwd file
        # the only thing you really want to change is 'file' and 'template'
        # you don't have to reconfigure oops if you only
        # change content passwd file or template: oops authomatically
        # reload file

        realm           oops
        scheme          Basic
        file            /usr/local/oops/passwd
        template        /usr/local/oops/auth_template.html
}

module pam {
        realm           oops
        scheme          Basic
        service         oops
        template        /usr/local/oops/auth_template.html
}

module redir {
        # file - regex rules.
        # each line consist of one or two fields (separated with white
space)
        # 1. regular expression
        # 2. redirect-location
        # if requested (by client) url match regex then
        # if we have redirect-url then we send '302 Moved Temporary' to
        #       redirect-location
        # if we have no redirect-location (i.e. we have no 2-nd field)
        #       then we send template.html (%R will be substituted by rule)
        #    or some default message if we have no template.
        # you don't have to reconfigure oops each time
        # you edit rules or template, they will be reloaded authomatically

        file            /usr/local/oops/redir_rules
        template        /usr/local/oops/redir_template.html
##      mode control will redir rewrite url or send Location: header
##      with new location. Values are 'rewrite' or 'bounce'
#       mode            rewrite

        # myport can have next form:
        # myport [{hostname|ip_addr}:]port ...
        #       myport  3128
        # it configure redir module to process requests on
        # given port
        #       myport 3128
        # This module can process requests which come on http_port
        # and/or on different port. For example, you wish oops
        # bind on two ports - 3128 and 3129, and all requests which come on
        # port 3129 must pass through filters, and requests which come on
port
        # 3128 (common http_port) - not. Then you have to uncomment next
line
        # myport 3129
        # which means exactly: bind oops to additional port 3129 and process
        # requests which come on this port.
        # myport can be in the next form:
        # myport [{hostname|ip_addr}:]port
}

module oopsctl {
        # path to oopsctl unix socket
        socket_path     /usr/local/oops/logs/oopsctl
        # time to auto-refresh page (seconds)
        html_refresh    300
}

module  vary {
        user-agent      by_charset
        accept-charset  ignore
}

module  transparent {
        myport                  3131
#       broken_browsers         MSIE
}

##
## %h -                 remote ip address
## %A -                 local ip address
## %d -                 ip address of source (peer or document server)
## %l -                 remote logname from identd (not suported now)
## %U -                 remote user (from 'Authorization' header)
## %u -                 remote user (from proxy-auth)
## %{format}t -         time with optional {format} (for strftime)
## %t -                 time with standard format %d/%b/%Y:%T %Z
## %r -                 request line
## %s -                 status code
## %b -                 bytes received
## %{header}i -         value of header in request
## %m -                 HIT/MISS
## %k -                 hierarchy (DIRECT/NONE/...)
##
## directive buffered can be followed by size of the buffer,
## like 'buffered 32000'
##
#module customlog {
#       path    /usr/local/oops/logs/access_custom1
#       format  "%h %l %u %t \"%r\" %>s %b"
#  squid httpd mode log emulation
#       format  "%h %u %l %t \"%r\" %s %b %m:%k"
#       buffered
#       path    /usr/local/oops/logs/access_custom2
#       format  "%h->%A %l %u [%t] \"%r\" %s %b \"%{User-Agent}i\""
#}

#module berkeley_db {
    ##
    #  dbhome - directory where all DB indexes reside. Use full path
    #       this directory must exist.
    #  dbname - filename for index file. Use just filename (no full path)
    ##

#       dbhome  /usr/local/oops/DB
#       dbname  dburl

    ##
    #  This parameter specifies internal cache size of BerkeleyDB.
    #  Increase this parameter for best performance (if you have a lot of
memory).
    #  For example:  db_cache_mem       64m
    #  Default and minimum value:       4m
    #
    #  This memory pool is not part of memory pool, specified by mem_max
parameter.
    #  WARNING: the amount of RAM used by oops will be increased by the
value of
    #  this parameter.
    ##
#    db_cache_mem       128m
#
#}

module  gigabase_db {
#    This module enable GigaBASE as database engine.
#    You can use berkeley_db or gigabase_db, not both.
#    Also, important notice - indexes created with different modules
#    are not compatible.
#    ##
#    #  dbhome - directory where all DB indexes reside. Use full path
#    #      this directory must exist.
#    #  dbname - filename for index file. Use just filename (no full path)
#    ##
#
        dbhome  /usr/local/oops/DB
        dbname  gdburl
#
#    ##
#    #  This parameter specifies internal cache size of BerkeleyDB.
#    #  Increase this parameter for best performance (if you have a lot of
memory).
#    #  For example:  db_cache_mem      64m
#    #  Default and minimum value:      4m
#    #
#    #  This memory pool is not part of memory pool, specified by mem_max
parameter.
#    #  WARNING: the amount of RAM used by oops will be increased by the
value of
#    #  this parameter.
#    ##
        db_cache_mem    128m
#
}

module wccp2 {
        identity  213.157.211.130
        service-group web-cache
        router  213.157.211.129
}

#module netflow {
#
# This module exports netflow v5 records to flow collector(s)
# Each record consists of source (document source, peer,.s
# destination address (client requested document), bytes transferred.
# If you supply file with route prefix table and autonomouos system numbers,
# then source and desctination ASNs will also present in flow records
#
#       file - path to the tile with prefixes (see file INSTALL).
#
#       file /usr/local/oops/prefix_table
#
#       source - flow records source address and port.
#
#       source    127.0.0.1:3333
#
#       collector - address and port of collector
#       you can have several lines(collectors).
#
#       collector 127.0.0.1:6666
#}

#module passwd_ldap {
# Time to keep login/pass in cache
#        refresh         3600
# searcbase - base, where we look for users
#        searchbase      ou=people,dc=elcom
# hostname of the ldap server
#        ldapserver      sunray
# port, where ldap server listen
#        ldapport        1389
#        template        /var/oops/auth_template.html
#}

----- Original Message ----- 
From: "Igor Khasilev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 4:24 PM
Subject: Re: [OOPS] Re: [OOPS] Вопросы по оптимизации oops


> On Wed, 25 Feb 2004, Max Shaposhnikov wrote:
>
> > Ну в общем после некоторых перенастроек стало и легче и тяжелее ;)
> > Hits доходит до 20-25% (что неплохо за полчаса работы ;) )
> > А вот потом - падает oops
> >
> > Что делать? Пробовать CVS версию опять? Перейти на гигабейз?
> >
> > Сторадж более двух гигов - ну на линуксе давно уже пофиксили все траблы
с
> > большими файлами
>
> Всё-таки советую разбить на несколько 2-х гиговых :(
>
> > Тем паче что изначально с raw пытался запустить
> >
> > Перед падением в логе появляются такие вещи:
> >
> > Wed Feb 25 11:46:57 2004  [0x7c01f0]attach_data(): No mem in attach
data.
> > Wed Feb 25 11:46:57 2004  [0x3000c0]Wed Feb 25 11:46:57 2004
> > [0x7401d]check_validity(): Can't create container.
> > fill_mem_obj(): Can't create container.
>
> Ну тут однозначно - либо памяти не хватает (malloc возвращает 0), либо
> что-то память портит(в принципе - менее вероятно). либо, см ниже
>
> > pidfile         /usr/local/oops/logs/oops.pid
> > statistics      /usr/local/oops/logs/oops_statfile
> >
> > icons-host      213.157.211.130
> > icons-port      81
> > icons-path      icons
> >
> > mem_max         2048m
> > lo_mark         1024m
>
> ха, а вот интересно, можно ли на linux-е в многонитевой программе получить
> heap размером до 2G? Может быть проблема в этом. Попробуйте уменьшить
> lo_mark до например 512m (ну и mem_max на всякий случай). Память всё-равно
> даром простаивать не будет а пойдет на файловые буфера.
>
> интересно увидеть кусок top-а перед смертью.
>
> > maxresident     32m
>
> Это можно немного уменьшить...
>
> > fetch_with_client_speed no
>
> Это можно поставить в yes
>
> Эти два параметра косвенно, но довольно сильно, влияют на фрагментацию и
> распределение памяти.
>
>
>
> Igor Khasilev                   |
> PACO Links, igor at paco dot net  |
>
> =====================================================================
> If you would like to unsubscribe from this list send message to
> [EMAIL PROTECTED] with "unsubscribe oops" in message body.
> Archive is accessible on http://lists.paco.net/oops-rus/
>

=====================================================================
If you would like to unsubscribe from this list send message to
[EMAIL PROTECTED] with "unsubscribe oops" in message body.
Archive is accessible on http://lists.paco.net/oops-rus/

Дати відповідь електронним листом