Dear Marty,
Please notice, that all time periods passed to NaviServer are in seconds if not specified differently. Calling
ns_http ... -expire 500 ...
means "expire in 8 minutes and 20 seconds". To set an expiry of half a second, one can use e.g. one of the following formats:
ns_http ... -expire 500ms ...
ns_http ... -expire 0.5s ...
Note, that there are many possible causes to endanger the liveliness of a system when depending on external services (which might take "forever", or "hang" or which might terminate on service restarts, or which might have a high variance in performance, etc.).
When you configure the HTTP client log [1] (introduced with 4.99.21) and you use a recent version of the nsstats module (checkout Bitbucket), you can get the statistics about the ns_http requests, similar to the access.log. With this you can identify certain potential bottlenecks.
When the HTTP-requests needed by your application are slow or unreliable, throwing in more cores or memory does not help. However, you can use a separate connection pool for such requests, or you have to use some background processing (like e.g. with ns_jobs).
[1] https://bitbucket.org/naviserver/naviserver/src/cdf5cb353b72e3b1560eaeb263d8dd898370634b/openacs-config.tcl#lines-640