We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sanic tries to create it's own loop which prevents the API from starting
api_1 | [2022-04-22 15:14:16,665] [wrolpi.root_api] [DEBUG] Running Sanic 21.12.1 with kwargs {'host': '0.0.0.0', 'port': 8081, 'workers': 1, 'auto_reload': True} api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] Sanic v21.12.1 api_1 | [2022-04-22 15:14:16,737] [sanic.root] [INFO] Sanic v21.12.1 api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] Goin' Fast @ http://0.0.0.0:8081 api_1 | [2022-04-22 15:14:16,739] [sanic.root] [INFO] Goin' Fast @ http://0.0.0.0:8081 api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] mode: production, single worker api_1 | [2022-04-22 15:14:16,740] [sanic.root] [INFO] mode: production, single worker api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] server: sanic api_1 | [2022-04-22 15:14:16,741] [sanic.root] [INFO] server: sanic api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] python: 3.8.12 api_1 | [2022-04-22 15:14:16,742] [sanic.root] [INFO] python: 3.8.12 api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] platform: Linux-5.4.0-91-generic-x86_64-with-glibc2.2.5 api_1 | [2022-04-22 15:14:16,743] [sanic.root] [INFO] platform: Linux-5.4.0-91-generic-x86_64-with-glibc2.2.5 api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] auto-reload: enabled api_1 | [2022-04-22 15:14:16,744] [sanic.root] [INFO] auto-reload: enabled api_1 | [2022-04-22 15:14:16 +0000] [63] [INFO] packages: sanic-routing==0.7.2, sanic-testing==0.8.2, sanic-ext==22.1.2 api_1 | [2022-04-22 15:14:16,745] [sanic.root] [INFO] packages: sanic-routing==0.7.2, sanic-testing==0.8.2, sanic-ext==22.1.2 api_1 | [2022-04-22 15:14:16 +0000] [63] [ERROR] Experienced exception while trying to serve api_1 | Traceback (most recent call last): api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/app.py", line 1204, in run api_1 | serve_single(server_settings) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/server/runners.py", line 206, in serve_single api_1 | serve(**server_settings) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/server/runners.py", line 129, in serve api_1 | loop.run_until_complete(app._startup()) api_1 | File "uvloop/loop.pyx", line 1495, in uvloop.loop.Loop.run_until_complete api_1 | File "uvloop/loop.pyx", line 1488, in uvloop.loop.Loop.run_until_complete api_1 | File "uvloop/loop.pyx", line 1377, in uvloop.loop.Loop.run_forever api_1 | File "uvloop/loop.pyx", line 515, in uvloop.loop.Loop._run api_1 | RuntimeError: Cannot run the event loop while another loop is running api_1 | [2022-04-22 15:14:16,750] [sanic.error] [ERROR] Experienced exception while trying to serve api_1 | Traceback (most recent call last): api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/app.py", line 1204, in run api_1 | serve_single(server_settings) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/server/runners.py", line 206, in serve_single api_1 | serve(**server_settings) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/server/runners.py", line 129, in serve api_1 | loop.run_until_complete(app._startup()) api_1 | File "uvloop/loop.pyx", line 1495, in uvloop.loop.Loop.run_until_complete api_1 | File "uvloop/loop.pyx", line 1488, in uvloop.loop.Loop.run_until_complete api_1 | File "uvloop/loop.pyx", line 1377, in uvloop.loop.Loop.run_forever api_1 | File "uvloop/loop.pyx", line 515, in uvloop.loop.Loop._run api_1 | RuntimeError: Cannot run the event loop while another loop is running api_1 | Traceback (most recent call last): api_1 | File "/opt/wrolpi/main.py", line 172, in <module> api_1 | result_ = loop_.run_until_complete(main(loop_)) api_1 | File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete api_1 | return future.result() api_1 | File "/opt/wrolpi/main.py", line 117, in main api_1 | return root_api.main(loop, args) api_1 | File "/opt/wrolpi/wrolpi/root_api.py", line 76, in main api_1 | return run_webserver(loop, args.host, args.port, args.workers) api_1 | File "/opt/wrolpi/wrolpi/root_api.py", line 64, in run_webserver api_1 | return api_app.run(**kwargs) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/app.py", line 1204, in run api_1 | serve_single(server_settings) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/server/runners.py", line 206, in serve_single api_1 | serve(**server_settings) api_1 | File "/usr/local/lib/python3.8/site-packages/sanic/server/runners.py", line 129, in serve api_1 | loop.run_until_complete(app._startup()) api_1 | File "uvloop/loop.pyx", line 1495, in uvloop.loop.Loop.run_until_complete api_1 | File "uvloop/loop.pyx", line 1488, in uvloop.loop.Loop.run_until_complete api_1 | File "uvloop/loop.pyx", line 1377, in uvloop.loop.Loop.run_forever api_1 | File "uvloop/loop.pyx", line 515, in uvloop.loop.Loop._run
This can be fixed by migrating to latest Sanic. Upgrading to newer Sanic will require rework of worker processes.
The text was updated successfully, but these errors were encountered:
lrnselfreliance
No branches or pull requests
Sanic tries to create it's own loop which prevents the API from starting
This can be fixed by migrating to latest Sanic. Upgrading to newer Sanic will require rework of worker processes.
The text was updated successfully, but these errors were encountered: