Your question
I write a script named test.py like this:
from playwright.sync_api import sync_playwright
print("a")
with sync_playwright() as p:
print("b")
my_other_business_code()
then I put this script to centos7 with python 3.9.0, and excute python3.9 test.py, it will print:
that is all right, But when I excute pm2 start 'python3.9 test.py', then it will just print a and being hang all the time.
I debug into sync_playwright(), find the finally hang code is dispatcher_fiber.switch():
I guss this could be the pm2 ENV caused, but I do not know the really reason, and do not know how to resolve this problem.
Do any one have a solution? Thanks.
Your question
I write a script named test.py like this:
then I put this script to centos7 with python 3.9.0, and excute
python3.9 test.py, it will print:that is all right, But when I excute
pm2 start 'python3.9 test.py', then it will just printaand being hang all the time.I debug into sync_playwright(), find the finally hang code is
dispatcher_fiber.switch():I guss this could be the pm2 ENV caused, but I do not know the really reason, and do not know how to resolve this problem.
Do any one have a solution? Thanks.