Hi,
I’m trying to migrate my web2py application from apache2/wsgihandler.py to
nginx/uwsgi and I found a strange issue,
that seems related to uwsgi.
I have a function that is calling phantomjs:
from selenium import webdriver
driver = webdriver.PhantomJS('phantomjs')
driver.get('http://%s/servlet?p=login&q=login&jumpto=features-forward' %
phoneip)
from the command line and via apache2/wsgihandler.py the call is working fine.
But calling the same function using nginx/uwsgi or apache2/uwsgi I always got
that error:
<class 'selenium.common.exceptions.WebDriverException'> Message: Can not
connect to GhostDriver
count = 0
while not utils.is_connectable(self.port):
count += 1
time.sleep(1)
if count == 30:
raise WebDriverException("Can not connect to GhostDriver")
Have I something wrong with the uwsgi configuration?
Or is that problem not related to uwsgi and maybe a web2py/selenium/phantomjs
issue?
I tried calling the function from a dedicated file but I always the same error.
My uwsgi configuration:
Ubuntu 14.04
/etc/uwsgi/web2py.ini
[uwsgi]
socket = /tmp/web2py.socket
pythonpath = /home/www-data/web2py/
mount = /=wsgihandler:application
processes = 4
master = true
harakiri = 60
reload-mercy = 8
cpu-affinity = 1
stats = /tmp/stats.socket
max-requests = 2000
limit-as = 512
reload-on-as = 256
reload-on-rss = 192
uid = www-data
gid = www-data
cron = 0 0 -1 -1 -1 python /home/www-data/web2py/web2py.py -Q -S welcome -M -R
scripts/sessions2trash.py -A -o
no-orphans = true
buffer-size=32768
enable-threads = true
uwsgi --version
2.0.10
nginx:
location / {
uwsgi_pass unix:///tmp/web2py.socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
Thank you for any response!
Raphael
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi