Hi,

 am very new to uWSGI and I am having a terrible time trying to get
anything to work.  Here is how I installed uwsgi  UWSGI_PROFILE=gevent
pip install http://projects.unbit.it/downloads/uwsgi-lts.tar.gz

Below is the the command  use

sudo /usr/local/bin/uwsgi --loop gevent --socket :8030 --wsgi-file
/home/ubuntu/workspace/uwsgiServer.py --master --async 5
--enable-threads --listen 100 --uid root

*** Starting uWSGI 1.2.3 (64bit) on [Wed Jun 13 18:03:30 2012] ***
compiled with version: 4.5.2 on 13 June 2012 15:30:34
detected number of CPU cores: 4
current working directory: /home/ubuntu
detected binary path: /usr/local/bin/uwsgi
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your memory page size is 4096 bytes
detected max file descriptor number: 1024
async fd table size: 1024
allocated 5200 bytes (5 KB) for 5 cores per worker.
lock engine: pthread robust mutexes
uwsgi socket 0 bound to TCP address :8030 fd 3
Python version: 2.7.1+ (r271:86832, Apr 11 2011, 18:37:12)  [GCC 4.5.2]
Python main interpreter initialized at 0x23347d0
threads support enabled
your server socket listen backlog is limited to 100 connections
*** Operational MODE: async ***
[uwsgi-signal] signum 0 registered (wid: 0 modifier1: 0 target: spooler)
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x23347d0
pid: 25545 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 25545)
spawned uWSGI worker 1 (pid: 25550, cores: 5)
*** running gevent loop engine [addr:0x4515e0] ***



1) Why does it say that the max file descriptor number: 1024
I have a sysctl file optimized for very high traffic.  ulimit is unlimited.

2) Per the below code that is supposed to be executed every 15
seconds....this is the output I get.  I used the example

from uwsgidecorators import *
    import uwsgi
    @timer(15, target='spooler')
    def hello_world(signum):
        r_main_writes.set('foo','bar')

could not deliver signal 0 to the spooler
uwsgi_signal_send(): Bad file descriptor [signal.c line 412]
could not deliver signal 0 to the spooler
uwsgi_signal_send(): Bad file descriptor [signal.c line 412]
could not deliver signal 0 to the spooler
uwsgi_signal_send(): Bad file descriptor [signal.c line 412]
could not deliver signal 0 to the spooler
uwsgi_signal_send(): Bad file descriptor [signal.c line 412]
could not deliver signal 0 to the spooler


3) I am using bottle.py.  Just trying to do a simple write does not
work but yet works outside of uwsgi.

import gevent
import gevent.socket
from bottle import route, run, default_app, request, response
import redis
try:
    #http://comments.gmane.org/gmane.comp.python.wsgi.uwsgi.general/3606
    from uwsgidecorators import *
    import uwsgi
    @timer(15, target='spooler')
    def hello_world(signum):
        r_main_writes.set('foo','bar')
except ImportError:
    pass

@route('/upixel/')
@route('/upixel')
def upixel():

    yield 'pixel'
    # this task will goes on after request end
    #gevent.spawn(bidderRedisWrite)


if __name__ == "__main__":
    # Interactive mode
    run(host='localhost', port=8070)
else:
    # Mod WSGI launch
    os.chdir(os.path.dirname(__file__))
    application = default_app()
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to