It's better if you extract the id's into a list and do a foreach so you can still preserve the transactionI was already doing it like this because otherwise I got a "Ran out of db pools" error message, and still didn't work.
About the stack size, you mean the one in the ns/thread section in config.tcl, right? I'm setting different values and doesn't work neither, but it's a very interesting comment, I'll have a closer look at it. Thank you!