Docker image multithreading
Hi there!
Im currently working on making a discord bot that im hosting on your docker image deployment service. I was trying to add multithreading to it to allow for multiple commands to be used at once and ran into the problem of it not working when deployed. Is there any support to dedicate multiple threads to a docker container?
Thanks for the help!
4 Replies
Project ID:
267175ec-9698-4262-b6e8-99a25173394a
267175ec-9698-4262-b6e8-99a25173394a
I'll need a lot more information to help you out here. Using multiple threads is supported on Railway. What language is your bot written in? How are you attempting to implement multithreading? What errors are you encountering?
Hey there!
My bot is written in c#, Im just using Task.Run() to start new threads. I havent had any errors but have found that when i run the bot locally on my pc it can handle multiple commands at once but when running on docker it will only run 1 at a time, I have also printed out the thread the each task is running on locally and confirmed that locally at least it was creating new threads for each request the way i intended.
Hey! Sorry to ping you but i dont want my thread to get lost/forgotten 😅