Hello, I have problem with deploying Pyramid 1.5.2 application using uWSGI.
My setup: Python 2.7.5 virtualenv Apache Linux uWSGI 2.0.9 64bit My Pyramid application works on virtualenv located at /www/virtual/t/trojanowski/piekarnia_wsgi. Python in virtualenv is there: /www/virtual/t/trojanowski/piekarnia_wsgi/bin/python uWSGI process is fired with options: home=/www/virtual/t/trojanowski/piekarnia_wsgi wsgi-file=/www/virtual/t/trojanowski/piekarnia_wsgi/piekarnia.wsgi WSGI file is following: import os import sys print os.path.dirname(sys.executable) print 'trying import pyramid...' venv = '/www/virtual/t/trojanowski/piekarnia_wsgi/bin/activate_this.py' print venv execfile(venv, dict(__file__=venv)) from pyramid.paster import get_app, setup_logging print str(get_app) ini_path = '/www/virtual/t/trojanowski/piekarnia_wsgi/src/development.ini' print str(ini_path) setup_logging(ini_path) application = get_app(ini_path, 'main') print application When in webbrowser I am invoking URL on traces see: Thu Feb 12 13:59:13 2015 - *** Starting uWSGI 2.0.9 (64bit) on [Thu Feb 12 13:59:13 2015] *** Thu Feb 12 13:59:13 2015 - compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-11) on 09 February 2015 11:38:24 Thu Feb 12 13:59:13 2015 - os: Linux-2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 Thu Feb 12 13:59:13 2015 - nodename: www3 Thu Feb 12 13:59:13 2015 - machine: x86_64 Thu Feb 12 13:59:13 2015 - clock source: unix Thu Feb 12 13:59:13 2015 - pcre jit disabled Thu Feb 12 13:59:13 2015 - detected number of CPU cores: 8 Thu Feb 12 13:59:13 2015 - current working directory: /etc/uwsgi/vassals Thu Feb 12 13:59:13 2015 - detected binary path: /usr/bin/uwsgi Thu Feb 12 13:59:13 2015 - uWSGI running as root, you can use --uid/--gid/--chroot options Thu Feb 12 13:59:13 2015 - chroot() to /chr Thu Feb 12 13:59:13 2015 - running "mount -t proc none /proc" (as root)... Thu Feb 12 13:59:13 2015 - setgid() to 2081 Thu Feb 12 13:59:13 2015 - setuid() to 6054 Thu Feb 12 13:59:13 2015 - chdir() to /www/virtual/t/trojanowski Thu Feb 12 13:59:13 2015 - your processes number limit is 10 Thu Feb 12 13:59:13 2015 - your process address space limit is 536870912 bytes (512 MB) Thu Feb 12 13:59:13 2015 - your memory page size is 4096 bytes Thu Feb 12 13:59:13 2015 - detected max file descriptor number: 1024 Thu Feb 12 13:59:13 2015 - lock engine: pthread robust mutexes Thu Feb 12 13:59:13 2015 - thunder lock: disabled (you can enable it with --thunder-lock) Thu Feb 12 13:59:13 2015 - uwsgi socket 0 inherited INET address 127.0.0.1:5200 fd 0 Thu Feb 12 13:59:13 2015 - Python version: 2.7.5 (default, Dec 3 2013, 08:35:16) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] Thu Feb 12 13:59:13 2015 - Set PythonHome to /www/virtual/t/trojanowski/piekarnia_wsgi Thu Feb 12 13:59:13 2015 - Python main interpreter initialized at 0x208fa50 Thu Feb 12 13:59:13 2015 - python threads support enabled Thu Feb 12 13:59:13 2015 - your server socket listen backlog is limited to 100 connections Thu Feb 12 13:59:13 2015 - your mercy for graceful operations on workers is 60 seconds Thu Feb 12 13:59:13 2015 - mapped 518400 bytes (506 KB) for 16 cores Thu Feb 12 13:59:13 2015 - *** Operational MODE: preforking+threaded *** Thu Feb 12 13:59:13 2015 - *** uWSGI is running in multiple interpreter mode *** Thu Feb 12 13:59:13 2015 - spawned uWSGI master process (pid: 1) Thu Feb 12 13:59:13 2015 - spawned uWSGI worker 1 (pid: 3, cores: 4) /usr/bin trying import pyramid... /www/virtual/t/trojanowski/piekarnia_wsgi/bin/activate_this.py /www/virtual/t/trojanowski/piekarnia_wsgi/src/development.ini *Thu Feb 12 13:59:21 2015 - WSGI app 0 (mountpoint='') ready in 8 seconds on interpreter 0x208fa50 pid: 3 (default app)* *Thu Feb 12 13:59:22 2015 - DAMN ! worker 1 (pid: 3) died, killed by signal 11 :( trying respawn ...* Thu Feb 12 13:59:22 2015 - Respawned uWSGI worker 1 (new pid: 13) /usr/bin trying import pyramid... /www/virtual/t/trojanowski/piekarnia_wsgi/bin/activate_this.py /www/virtual/t/trojanowski/piekarnia_wsgi/src/development.ini *Thu Feb 12 13:59:30 2015 - WSGI app 0 (mountpoint='') ready in 8 seconds on interpreter 0x208fa50 pid: 13 (default app)* *Thu Feb 12 13:59:31 2015 - DAMN ! worker 1 (pid: 13) died, killed by signal 11 :( trying respawn ...* Thu Feb 12 13:59:31 2015 - Respawned uWSGI worker 1 (new pid: 23) /usr/bin trying import pyramid... /www/virtual/t/trojanowski/piekarnia_wsgi/bin/activate_this.py /www/virtual/t/trojanowski/piekarnia_wsgi/src/development.ini Content of development.ini is following: /www/virtual/t/trojanowski/piekarnia_wsgi/src/development.ini ### # app configuration # http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html ### [app:main] use = egg:bread pyramid.reload_templates = true pyramid.reload_assets = true pyramid.debug_authorization = false pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.default_locale_name = pl pyramid.prevent_http_cache = true pyramid.reload_all = true available_languages = de en es pl pt bread.secret_key = pyramid.includes = pyramid_debugtoolbar pyramid_tm pyramid_beaker pyramid_webassets pyramid_mako #SQLAlchemy configuration sqlalchemy.url = sqlalchemy.pool_size = 5 sqlalchemy.max_overflow = 1 sqlalchemy.pool_recycle = 3600 sqlalchemy.pool_timeout = 30 sqlalchemy.echo = false database.schema = shop #Beaker Cache configuration cache.regions = 1s, 1m, 5m, 15m, 1h cache.type = memory cache.1s.expire = 1 cache.1m.expire = 60 cache.5m.expire = 300 cache.15m.expire = 900 cache.1h.expire = 3600 #Beaker Sessions configuration session.type = file session.data_dir = %(here)s/data/sessions/data session.lock_dir = %(here)s/data/sessions/lock session.key = session.secret = session.cookie_on_exception = true #Webassets configuration webassets.base_dir = bread:static/ webassets.base_url = /static webassets.debug = True webassets.updater = timestamp webassets.static_view = True webassets.jst_compiler = Handlebars.compile #webassets.cache = True #webassets.cache_max_age = 3600 # By default, the toolbar only appears for clients from IP addresses # '127.0.0.1' and '::1'. # debugtoolbar.hosts = 127.0.0.1 ::1 ### # wsgi server configuration ### [server:main] use = egg:waitress#main host = 0.0.0.0 port = 6543 ### # logging configuration # http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html ### ### # logging configuration # http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html ### [loggers] keys = waitress, root, bread, sqlalchemy, performance, importer [handlers] keys = waitress, console, sqlalchemy, rotatelog, performance, importer [formatters] keys = generic, rotatelog, performance, importer [logger_root] level = INFO handlers = console, rotatelog [logger_bread] level = DEBUG handlers = rotatelog qualname = bread [logger_waitress] level = DEBUG handlers = waitress qualname = waitress [logger_performance] level = INFO handlers = performance, rotatelog qualname = performance [logger_importer] level = INFO handlers = importer, rotatelog qualname = importer [logger_sqlalchemy] level = WARN handlers = sqlalchemy, rotatelog qualname = sqlalchemy.engine # "level = INFO" logs SQL queries. # "level = DEBUG" logs SQL queries and results. # "level = WARN" logs neither. (Recommended for production systems.) [handler_console] class = StreamHandler args = (sys.stderr,) level = NOTSET formatter = generic [handler_waitress] class: handlers.TimedRotatingFileHandler args: (r'%(here)s/traces/waitress.log', 'midnight', 7, 14, 'utf-8', False, True) level: DEBUG formatter: rotatelog [handler_rotatelog] class: handlers.TimedRotatingFileHandler args: (r'%(here)s/traces/trace.log', 'midnight', 7, 14, 'utf-8', False, True) level: DEBUG formatter: rotatelog [handler_performance] class: handlers.TimedRotatingFileHandler args: (r'%(here)s/traces/performance.log', 'midnight', 7, 14, 'utf-8', False, True) level: INFO formatter: performance [handler_importer] class: handlers.TimedRotatingFileHandler args: (r'%(here)s/traces/importer.log', 'midnight', 7, 14, 'utf-8', False, True) level: INFO formatter: importer [handler_sqlalchemy] class: handlers.TimedRotatingFileHandler args: (r'%(here)s/traces/sqlalchemy.log', 'midnight', 7, 14, 'utf-8', False, True) level: INFO formatter: performance [formatter_generic] #format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s datefmt=%m/%d %H:%M:%S [formatter_exc] format = %(asctime)s %(message)s [formatter_rotatelog] format: %(asctime)s %(levelname)s: %(message)s <file: %(filename)s, line: %(lineno)d> datefmt: %d-%m-%Y, %H:%M:%S [formatter_performance] format = %(asctime)s,%(msecs)03d %(message)s datefmt = %H:%M:%S [formatter_importer] format: %(asctime)s,%(msecs)03d %(levelname)s: %(message)s datefmt: %d-%m-%Y, %H:%M:%S Guys, do you have any idea why I am getting: *Thu Feb 12 13:59:31 2015 - DAMN ! worker 1 (pid: 13) died, killed by signal 11 :( trying respawn ...* Regards, Radosław Trojanowski
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
