A process running to the server just stop working (on print)

i have depolyed my app all seems to work just fine. i have used multi - processing

with Pool(4) as p:
    func = partial(__get_item_data, platform)
    args =, args)
    if p.is_alive():
        -- i have added this right now this p.terminate()
        f.write('Terminated due to time out')

i have a feeling that what happend is that the multi process haven't stop to work and when i try again to make a call to server in the process itself it stops. this is way to weird because its fail on a print , here is the code :

f.write('FindingApi Arrived ' + '\n') -- > it is printing it very well.
all of this are parameters of the function (they are working i don't get the error on the server log
after that the function stops to work.
f.write('validate the data: ' + page_number+ '\n')
f.write('validate the data: ' + platform+ '\n')
f.write('validate the data: ' + store_name+ '\n')
f.write('validate the data: ' + pages+ '\n')

i wish somebody have an idea.

Your processes may be having locking issues with the single file. Try having each process write to a different file.