Roberto Luis
Roberto Luis
RRailway
Created by Roberto Luis on 1/14/2024 in #✋|help
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?
9 replies