Note that there are some explanatory texts on larger screens.

plurals
  1. POuWSGI is unable to find Redis
    primarykey
    data
    text
    <p>Here is my setup:</p> <p>/etc/nginx/conf.d/mysite.conf</p> <pre><code>server { listen 80; server_name mysite.com; location / { include uwsgi_params; uwsgi_pass unix:/tmp/mysite.sock; uwsgi_param UWSGI_PYHOME /srv/www/mysite/env; uwsgi_param UWSGI_CHDIR /srv/www/mysite; uwsgi_param UWSGI_MODULE app; uwsgi_param UWSGI_CALLABLE app; } } </code></pre> <p>/etc/init/uwsgi.conf</p> <pre><code>description "uWSGI" start on runlevel [2345] stop on runlevel [06] respawn exec uwsgi --ini /etc/uwsgi/emperor.ini </code></pre> <p>/etc/uwsgi/emperor.ini</p> <pre><code>[uwsgi] emperor = /etc/uwsgi/vassals uid = uwsgi gid = nginx logto = /var/log/uwsgi/emperor.log </code></pre> <p>/etc/uwsgi/vassals/mysite.ini</p> <pre><code>[uwsgi] protocol = uwsgi max-requests = 5000 chmod-socket = 660 master = True vacuum = True venv = /srv/www/mysite/env socket = /tmp/mysite.sock logto = /var/log/uwsgi/mysite.log </code></pre> <p>/srv/www/mysite/app.py</p> <pre><code>from flask import Flask from redis import Redis app = Flask(__name__) # Test Redis @app.route('/test') def test(): redis = Redis() mykey = redis.get('mykey') return mykey if __name__ == '__main__': app.run() </code></pre> <p>/var/log/uwsgi/mysite.log</p> <pre><code>Traceback (most recent call last): File "/srv/www/mysite/app.py", line 2, in &lt;module&gt; from redis import Redis ImportError: No module named redis unable to load app 0 (mountpoint='') (callable not found or import error) --- no python application found, check your startup logs for errors --- [pid: 2517|app: -1|req: -1/5] 71.202.185.125 () {48 vars in 813 bytes} [Wed Jul 3 18:17:08 2013] GET /demo/check =&gt; generated 21 bytes in 14 msecs (HTTP/1.1 500) 1 headers in 57 bytes (0 switches on core 0) Traceback (most recent call last): File "/srv/www/mysite/app.py", line 2, in &lt;module&gt; from redis import Redis ImportError: No module named redis unable to load app 0 (mountpoint='') (callable not found or import error) --- no python application found, check your startup logs for errors --- [pid: 2517|app: -1|req: -1/6] 71.202.185.125 () {46 vars in 724 bytes} [Wed Jul 3 18:17:08 2013] GET /favicon.ico =&gt; generated 21 bytes in 14 msecs (HTTP/1.1 500) 1 headers in 57 bytes (0 switches on core 0) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload