View · Index

Weblog

Filtered by date 2020-08-21, 1 - 2 of 2 Postings (all, summary)

OpenACS Community Wiki

Created by gustaf neumann, last modified by Gustaf Neumann 21 Aug 2020, at 04:54 PM

This is the OpenACS Wiki system, built with the xowiki package. This wiki contains user documentation, how-tos, and tips and tricks related to OpenACS. It also serves as a collaboration area for OpenACS contributors.

Quick Links:

Recent Wiki Page Edits:

Subsystems Documentation

External Resources

Cookbook

Tutorials for Administrators

OpenACS Monitoring (5 months ago)
rl_json (12 months ago)
OpenACS/dotLRN windows installer how to (2 years ago)

Non-Core Packages

Chat (5 months ago)
XoWiki (5 months ago)
XOTcl Core (5 months ago)
xooauth (9 months ago)
xowf (XoWiki Workflow) (2 years ago)

Documentation

HOME

for beginning developers (5 months ago)
Privacy Policy (10 months ago)

Tutorials

Core Documentation

Installing OpenACS (6 months ago)

OpenACS Projects

Coding Standards

Security Guidelines (9 months ago)
Coding Standards - Index (9 months ago)
Tcl Procs (1 year ago)

Events

OpenACS conferences (1 year ago)

Package Documentation

Packages

   

How to handle "connection already closed" errors

Created by Gustaf Neumann, last modified by Gustaf Neumann 21 Aug 2020, at 12:47 PM

Newer versions of NaviServer produce by default an error, when a script tries to write a connection, which as already closed by the server (e.g. doing two ad_returndirect in a sequence). Such program code does not make sense and indicates an error that should be fixed.

In general, one can silence the behavior or fix it. To silence the behavior, on can alter the NaviServer config file to silently swallow these error conditions named "rejectalreadyclosedconn". See e.g. Sample configuration file

Recent version of OpenACS (oacs-5-10) have such error conditions already fixed in all the actively maintained packages in the oacs-5-10 branch. In order to fix custom packages, one has to watch out for the following situations:

  • Request pages: all after every command that finishes a request a call to "ad_script_abort" is required. Such commands are essentially all "ns_return*" commands and the "ad_*" counterparts.
  • Filters: in case, an application handles such commands in filters, the filter has to return with "filter_return" to stop the filter chain (i.e. not to call further filters). Notice that the documentation of ns_register states that the request page is as well handled to trigger e.g. the access log entry. So, in rare conditions, one has to check as well for additional closed cases by using "ns_conn isconnected".

Sometimes, it might be still tricky to find such occurrences. On recent versions of OpenACS one can use the xo* machinery to activate/deactivate Tcl command traces for such commands via ds/shell, like e.g. in:

xo::broadcast send {
  set traced_cmds [info commands ::ns_return*]
  foreach cmd $traced_cmds {trace add execution $cmd  enter {::tcltrace::before}}
}

"xo::broadcast" sends the command to every tcl based thread that executes the provided command. Tracing can be deactivated by replacing "trace add" by "trace remove" in this command.

Plain OpenACS (in oacs-5-10) has as well some support for this via acs-tcl/tcl/tcltrace-init.tcl.

previous August 2020 next
Sun Mon Tue Wed Thu Fri Sat
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 (1) 11 12 13 14 15
16 17 18 19 20 (2) 21 22
23 (4) 24 25 (1) 26 (2) 27 28 29
30 31 1 2 3 4 5

Popular tags

17 , 5.10 , 5.10.0 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines , host-node-map , hstore
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org