Hi Roberto,

It happened again:

Traceback:
Traceback (most recent call last):

  File
"/home/simplicitymedialtd/webapps/cdn05.prod/src/webapp/queue/models.py",
line 289, in getURL
    f = urllib.urlopen("http://www.spankwire.com/Player/VideoXML.aspx?id=%s
"%self.videoid)

  File "/usr/local/lib/python2.7/urllib.py", line 84, in urlopen
    return opener.open(url)

  File "/usr/local/lib/python2.7/urllib.py", line 205, in open
    return getattr(self, name)(url)

  File "/usr/local/lib/python2.7/urllib.py", line 342, in open_http
    h.endheaders(data)

  File "/usr/local/lib/python2.7/httplib.py", line 940, in endheaders
    self._send_output(message_body)

  File "/usr/local/lib/python2.7/httplib.py", line 803, in _send_output
    self.send(msg)

  File "/usr/local/lib/python2.7/httplib.py", line 755, in send
    self.connect()

  File "/usr/local/lib/python2.7/httplib.py", line 736, in connect
    self.timeout, self.source_address)

  File "/usr/local/lib/python2.7/socket.py", line 551, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):

IOError: [Errno socket error] [Errno -3] Temporary failure in name
resolution

Fri Aug  5 04:20:10 2011 - writev(): Broken pipe
[plugins/python/wsgi_headers.c line 182]
Fri Aug  5 04:20:11 2011 - write(): Broken pipe
[plugins/python/wsgi_subhandler.c line 189]
Fri Aug  5 04:21:28 2011 - writev(): Broken pipe
[plugins/python/wsgi_headers.c line 182]
Fri Aug  5 04:21:28 2011 - write(): Broken pipe
[plugins/python/wsgi_subhandler.c line 189]
Fri Aug  5 04:21:28 2011 - writev(): Broken pipe
[plugins/python/wsgi_headers.c line 182]
Fri Aug  5 04:21:28 2011 - write(): Broken pipe
[plugins/python/wsgi_subhandler.c line 189]
Fri Aug  5 04:21:28 2011 - writev(): Broken pipe
[plugins/python/wsgi_headers.c line 182]
Fri Aug  5 04:21:28 2011 - write(): Broken pipe
[plugins/python/wsgi_subhandler.c line 189]

It happened shortly after a urllib() call.

urllib() has sometimes been known to block the GIL when it's stuck in
'resolving' or certain tcp states. It could also be, that because urllib()
was taking a long time to return back a result, all the workers became busy,
and uwsgi was no longer able to handle the request. If this is the case,
uWSGI should log this as "workers are busy, rejecting request" or something
like that.

Here is the config:

[program:cdn05]
command=/usr/local/bin/uwsgi
  --socket /home/simplicitymedialtd/webapps/cdn05.prod/sock/uwsgi.sock
  --harakiri 120
  --logdate
  --max-requests 1000
  --master
  --processes 8
  --xmlconfig /home/simplicitymedialtd/webapps/cdn05.prod/uwsgi.xml
  --logto /home/simplicitymedialtd/webapps/cdn05.prod/log/uwsgi.log
  --listen 128
  --limit-as 256
  --socket-timeout 5
  --reaper
  --disable-logging
  --chmod-socket=666

directory=/home/simplicitymedialtd/webapps/cdn05.prod/src/
environment=DJANGO_ENVIRONMENT=dev
user=simplicitymedialtd
autostart=true
autorestart=true
stdout_logfile=/home/simplicitymedialtd/webapps/cdn05.prod/log/supervisord.stdout.log
redirect_stderr=true
stopsignal=QUIT



On Fri, Aug 5, 2011 at 5:47 AM, Roberto De Ioris <[email protected]> wrote:

>
> > After a few days, one of my uWSGI instances did this:
> >
> > Thu Aug  4 18:08:05 2011 - write(): Broken pipe
> > [plugins/python/wsgi_subhandler.c line 189]
> > Thu Aug  4 18:08:05 2011 - writev(): Broken pipe
> > [plugins/python/wsgi_headers.c line 182]
> > Thu Aug  4 18:08:05 2011 - write(): Broken pipe
> > [plugins/python/wsgi_subhandler.c line 189]
> > Thu Aug  4 18:08:05 2011 - writev(): Broken pipe
> > [plugins/python/wsgi_headers.c line 182]
> > Thu Aug  4 18:08:05 2011 - write(): Broken pipe
> > [plugins/python/wsgi_subhandler.c line 189]
> > Thu Aug  4 18:08:17 2011 - writev(): Broken pipe
> > [plugins/python/wsgi_headers.c line 182]
> > Thu Aug  4 18:08:18 2011 - write(): Broken pipe
> > [plugins/python/wsgi_subhandler.c line 189]
> > Thu Aug  4 18:08:37 2011 - writev(): Broken pipe
> > [plugins/python/wsgi_headers.c line 182]
> > Thu Aug  4 18:08:37 2011 - write(): Broken pipe
> > [plugins/python/wsgi_subhandler.c line 189]
> >
> > I had to kill it and restart for the problem to go away.
> >
> > Any idea what the above might be?
> >
> >
>
> Hi, very hard to say, ca you report the uWSGI version and its full
> configuration ? Do this error was printed continuosly in your logs or
> after them uWSGI was simply blocked ?
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to