Multiprocessing doesn't seem to work on Railway VPS

Hi guys, i'm kinda new with project deployments at all and I have a project that uses multiprocessing, when I run it on any PC, it works well, but when I deploy on Railway it doesn't. To exemplify here is the main problem: acc1 = example_api(email, password) #Infos = ("Chris",10, 2000) acc2 = example_api(email, password) #Infos = ("Angela", 12, 1995) acc1.showInfos() acc2.showInfos() Output: ("Chris",10, 2000) ("Chris",10, 2000) Then, I used multiprocessing to test if could return me the correct infos, and worked well: from multiprocessing import Process def example_func(email, password): acc = example_api(email, password) acc.showInfos() process1 = Process(target=example_func, args=("XchrisX", 123456)) process2 = Process(target=example_func, args=("XangelaX", abcdef123)) process1.start() process2.start() Output: ("Chris",10, 2000) ("Angela", 12, 1995) Then, when I run the multiprocessing app on Railway VPS, it just returns: Output: ("Chris",10, 2000) ("Chris",10, 2000) Could some one help me out with it?
6 Replies
Percy
Percy10mo ago
Project ID: N/A
Roberto Luis
Roberto Luis10mo ago
N/A
Brody
Brody10mo ago
whats a fisical machine?
Roberto Luis
Roberto Luis10mo ago
Oh, I'm sorry, its a physical machine, like, a normal PC.
Brody
Brody10mo ago
oh lol would not have guessed that in a million years
when I run the multiprocessing app on Railway VPS
railway does not run your code on a vps, it runs your code inside a docker container, perhaps you might want to try debugging this code issue locally in a dockerized environment?
Roberto Luis
Roberto Luis10mo ago
I got it. I'll try run it on a docker.
Want results from more Discord servers?
Add your server