You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to reproduce your setup with python3.6. As you described it the uwsgi app could not hinge the application. The following worked:
app.py
import atexit
import os
import vmprof
# I removed the import of app_factory here flask 0.12 does not seem to export it
fp = open("/tmp/vmprof.out-%s" % os.getpid(), "a+") # only 'r' does not work, must be writable as well
vmprof.enable(fp.fileno())
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
def disable_at_exit():
vmprof.disable()
fp.close()
atexit.register(disable_at_exit)
Then mount the application on the mountpoint: /yourapplication
Activity
planrich commentedon Feb 8, 2018
Tried to reproduce your setup with python3.6. As you described it the uwsgi app could not hinge the application. The following worked:
app.py
Then mount the application on the mountpoint: /yourapplication
If that does not work for you I need more information to reproduce.
methane commentedon Feb 8, 2018
AFAIK, vmprof uses SIGPROF.
This option is required, maybe.
http://uwsgi-docs.readthedocs.io/en/latest/Options.html#py-call-osafterfork