Forum OpenACS Q&A: Re: Incredible Performance Decrease - Please help!!!

Collapse
Posted by Nima Mazloumi on

While testing the discussion forum with the PermissionCacheP I experienced the following error:

Request Error
Too many positional parameters specified
    while executing
"permission::permission_p_not_cached__arg_parser"
    (procedure "permission::permission_p_not_cached" line 1)
    invoked from within
"permission::permission_p_not_cached -party_id 0 -object_id  -privilege write"
    ("eval" body line 1)
    invoked from within
"eval $script"
    invoked from within
"ns_cache eval util_memoize $script {
	    list $current_time [eval $script]
	}"
    (procedure "util_memoize" line 20)
    invoked from within
"util_memoize "permission::permission_p_not_cached -party_id $party_id -object_id $object_id -privilege $privilege"  [parameter::get -package_id [ad_ac..."
    (procedure "permission::permission_p" line 10)
    invoked from within
"permission::permission_p -party_id $user_id -object_id $message_id -privilege write"
    (procedure "forum::security::can_post_message_p" line 3)
    invoked from within
"forum::security::can_post_message_p -message_id $parent_id -user_id 0"
    invoked from within
"expr [ad_conn user_id] != 0 &&  ([empty_string_p $forum_id] ||  [forum::security::can_post_forum_p -forum_id $forum_id -user_id 0]) &&  ([empty_string..."
    invoked from within
"set anonymous_allowed_p [expr [ad_conn user_id] != 0 &&  ([empty_string_p $forum_id] ||  [forum::security::can_post_forum_p -forum_id $forum_id -user_..."
    ("uplevel" body line 65)
    invoked from within
"uplevel {
    	  ad_page_contract {
    
    Form to create message and insert it

    @author Ben Adida (ben@openforce.net)
    @creation-date 2002-0..."
    (procedure "code::tcl::/www/unima0/packages/forums/www/message-post" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
                $handler
            } ad_script_abort val {
                # do nothing
            }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	rp_serve_abstract_file "$root/$path"
	set tcl_url2file([ad_conn url]) [ad_conn file]
	set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

Turning the PermissionCacheP solved the error

Has someone an idea what happens here. Looks like a bug, but I am not sure. Could also be why the note to PermissionCacheP emphasises

Whether to cache permission_p calls. Use with extreme caution. Only 
direct permissions managed via the tcl api are properly handled and 
some packages modify permissions directly in the database and will not 
work properly when this is turned on. You must restart the server 
after changing this param.
Collapse
Posted by Lars Pind on
Nima,

This looks like a bug.

Would you mind filing in bug-tracker? Looks like something that should be fixed for 5.0.1.

/Lars