Issue with uWSGI example after code refactoring
See original GitHub issueAfter upgrading PowerDNS-Admin today from a codebase before the refactoring I can’t start the application via uwsgi anymore. The Wiki example has mount = /pdns=run.py
which I think should now be mount = /pdns=powerdnsadmin:app
but my service refuses to start and gives the following error:
unable to load app 0 (mountpoint='/pdns') (callable not found or import error)
Does anyone have a pointer what the mount directive should look like with the new code structure? Or am I maybe searching for the wrong thing and this is connected with the additional FLASK_APP and FLASK_CONFIG environment variables that uwsgi needs to access but can’t?
Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
uwsgi + nginx... mistake after mistake in options - Stack Overflow
Just use a Systemd service per app. Install uWSGI into the virtualenv your app is in, not system-wide. If you can trust all...
Read more >Flask application + uwsgi: SSL SYSCALL EOF detected error
When we turn lazy apps on the ssl syscall issue disappears. Any assistance figuring this out would be greatly appreciated. Versions. OS: RHEL ......
Read more >We'll Do It Live: Updating Machine Learning Models on Flask ...
This post details a simple design pattern using Flask, uWSGI, middleware, and process locks to update your API while it is live and...
Read more >The Art of Graceful Reloading — uWSGI 2.0 documentation
When triggered, it will restart one worker at time, and the following worker is not reloaded until the previous one is ready to...
Read more >Install and configure uwsgi in Emperor mode - Puppet Forge
puppet-uwsgi. A puppet module for installing and managing uWSGI (in emperor mode) ... uwsgi::app: example: uid: example gid: example.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please forget the script I posted, it doesn’t work properly as on each request, the app is completely started again.
The proper way to start PDNSA using uwsgi is:
wsgi ... --mount /='powerdnsadmin:create_app()'
No additional script is necessary,create_app()
is already there.Put the following glue code in a
run_uwsgi.py
:And then use
mount = /pdns=run_uwsgi:main
.