#community-help

Changing Thread-Pool-Size on a Live Server

TLDR Robert inquired whether it was possible to change thread-pool-size on a live server. Jason suggested a method, but it didn't work. Robert highlighted a potential bug affecting the server performance.

Powered by Struct AI
pray1
Oct 19, 2022 (11 months ago)
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
10:03 PM
Any way to change thread-pool-size after the server is running? Turns out 32 threads isn't enough and I need to bump it way up. Was hoping to avoid stopping/starting server as it takes about 2 hours to cycle.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:05 PM
IIRC thread-pool-size can only be changed at startup… But just in case, could you try this:

curl "" \
        -X POST \
        -H 'Content-Type: application/json' \
        -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
        -d '{"thread-pool-size": 240}'
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
10:10 PM
thanks. The curl config call is just hanging, doesn't look like it's gonna return. Probably because typesense is pegging the 32 CPUs at100%. I think I'll have to bring search and typsense down and back up again. No worries.
10:38
Robert
10:38 PM
This particular instance by the way always has '1' queued_write, it's like forever stuck.
10:40
Robert
10:40 PM
I think I know the set of document inserts that caused it. Once I get the production server fixed and put out all the fires I plan on spending some time figuring out which document causes the stuck queued write and submit a bug about it if I discover a problem.
pray1
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:02 PM
Hmmm, that does sound like a bug…