Forum OpenACS Q&A: Suddenly(!) the allowable stacksize shrunk?

For months, I have been starting aolserver with a 4Mb stacksize.

ns_param stacksize [expr 4*1024*1024]

Last night around 4am, one of my aolserver processes died, and the restart code could not resurrect it.

Looking in the server logs, what I see are endless restarts all ending with:

: nsthread(1526) error: pthread_attr_setstacksize failed in NsThreadCreate: Invalid argument

When I set the stacksize to 2Mb, everything runs just fine once more.

Can anyone help me understand this behavior?

In the interest of finger pointing without understanding, yesterday I installed the RH 8 ptrace patch with its new kernel, but I hadn't rebooted this server yet.

Thanks,

Collapse
Posted by Jonathan Ellis on
what are you doing that requires such a large stack?
Collapse
Posted by Jerry Asher on
In an message to the aolserver list in mid February, Jeff Hobbs mentioned something on the order of his feeling that all tcl threads need or would benefit from a large stack.
The openacs lore has been that 500K has been the appropriate stacksize.

I added that warning in myself after getting enough reports. I narrowed the size to 2400K to match the default Tcl eval stack recursion limit of 1000. I think 4M is more than you need, 1M will likely do it, and 2400K covers all the bases.

Jeff