Am 21.03.2016 um 09:18 schrieb Robbin Ehn:
(I must admit I'm very curious why anyone would have a thread name that
long)

Since thread dumps are very useful for problem analysis but only contain stacks but no data, sometimes people switch the thread name on every new workload the thread handles, so that the thread name in the dump contains the info, kind of side-channel to tunnel data into the dump.

For example: in a web container one might append the request info (HTTP method, URI, query string, time the request began) with a separator to the original thread name at the beginning of the request, and strip it at the end. So if things hang or get slow and you take a thread dump, the info on what type or request each thread is working is present in that dump.

I'm not arguing whether this is a good pattern or not, but I have seen this pattern in production. Still, 1996 characters isn't easily reached even with this pattern.

Regards,

Rainer

Reply via email to