Forum OpenACS Q&A: include tag weirdness
I've never had a problem with an include tag before, so this has me stumped. I'm doing some experimenting and not working with any packages, so:
- The page with the include tag is in /web/serverroot/www/
- The included file is in /web/serverroot/resources/
This server is OACS 4.6.3 server, which I setup just by making a copy of a working server.
The include is right near the end of the file, like so:
<div class="tk"> <include src="/resources/test"> <ul> <li>63.57</li> <li>22.225</li> <li>22.1421</li> </ul> </div> </div> </body> </html>
And for now, /resources/test.adp just contains <p>TEST<p>
When I load the file, it's getting somewhat randomly mangled. For instance, on one invocation, the following gets put at the beginning of the file:
<ul> <li>63.57</li> <li>22.225</li> <li>22.1421</li> </ul> </div> </div> </body> </htm> <!DOCTYPE ...
And at the end:
... <div class="tk"> <p>TEST</p> l>
Everytime it's a little bit different, but always the end before the beginning. What's going on? It's looks like different threads are sending output in the wrong order, but I've never had that happen before?
Is this a VM environment? running aolserver3.x?
I raised the nsparam stacksize from [expr 128*1024] to [expr 256*1024] in one (as part of a tuning exercise).
On restart, aolserver began responding with oddly broken html pages through the templating system.
I set the nsparam stacksize to its original setting, restarted and the problem went away...
To make the copy, I just copied /web/server1 to /web/server2, and made the few necessary changes to the server2 config file. Both servers are for the moment using the same database, but I wouldn't expect that to cause this kind of trouble.
It can be a real pain to track down, and the symptoms are very subtle - often a stray > with a few chars exactly as you have expeienced.