I did some more digging on this in the decaf code.
The error message is coming from this code in ThreadLocalImpl.cpp:
ThreadLocalImpl::ThreadLocalImpl() : tlsKey(0) {
tlsKey = Threading::createThreadLocalSlot(this);
if (tlsKey < 0) {
throw RuntimeException(
__FILE__, __LINE__, "Thread Local storage limit reached.");
}
}
So looking at createThreadLocalSlot, in Threading.cpp I see:
...stuff...
for (index = 0; index < DECAF_MAX_TLS_SLOTS; index++) {
if (library->tlsSlots[index] == NULL) {
library->tlsSlots[index] = threadLocal;
break;
}
}
...stuff...
return index < DECAF_MAX_TLS_SLOTS ? index : -1;
So, looks like DECAF_MAX_TLS_SLOTS is what's causing my problem. This is
defined in ThreadingTypes.h:
#define DECAF_MAX_TLS_SLOTS 384
Hmmm... 384 is 128 times 3. So maybe each mq consumer creates 3 threads,
therefore I'm running out at 128?
I wonder what will happen if I just increase DECAF_MAX_TLS_SLOTS and
rebuild. Right now I'm just blundering around. I don't suppose there are
still any decaf developers around?
--
View this message in context:
http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-library-limit-on-number-of-connections-threads-tp4730011p4730012.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.