question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'IOError: [Errno 11] Resource temporarily unavailable' with Peewee sample blog app

See original GitHub issue

I get the error shown below when I run the Peewee sample blog app from here: https://github.com/coleifer/peewee/tree/master/examples/blog

Specifically this happens when Micawber tries to display a post with links that need converting to embeds (e.g. a YouTube video link).

I’ve been able to reproduce this reliably with different links (e.g. Vimeo links instead of YouTube) and different browsers. It doesn’t always happen immediately, but if you click around to view the posts with embeds, then return to the index page, then view posts again, the error appears and the page is either unavailable or shows the page with no CSS. Errors in the console show that files failed to load: Failed to load resource: net::ERR_SOCKET_NOT_CONNECTED

This is in a Python 2.7.10 virtualenv on Ubuntu 15.10 running the Flask dev server.

Interestingly, running it in a Python 3.4 virtualenv works without issues. But it would be great to have a fix for Python 2.

Exception happened during processing of request from ('127.0.0.1', 33044)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "/home/tom/.virtualenvs/peewee-blog/local/lib/python2.7/site-packages/werkzeug/serving.py", line 216, in handle
    rv = BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/home/tom/.virtualenvs/peewee-blog/local/lib/python2.7/site-packages/werkzeug/serving.py", line 247, in handle_one_request
    self.raw_requestline = self.rfile.readline()
IOError: [Errno 11] Resource temporarily unavailable

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
jacqueriecommented, Jun 16, 2016

I know that I’m doing some necroposting, but this was the only other mention on the internet of the problem we were having, so I felt I had to : )

We were seeing the same exception in our project, despite not using micawber anywhere, and @mihaibivol finally found the culprit: the call to socket.setdefaulttimeout here interferes with the way Flask handles sockets.

Here’s a reduced example: https://github.com/jacquerie/isbnlib-flask-error-demo/blob/cf9114853bbc4c52d99098f16c007510d1e0320e/app.py

If you run app.py as it is and access http://localhost:5000 you’ll see the error in OP; if you comment those lines out it will be gone.

0reactions
keybitscommented, Jun 16, 2016

Thanks for this 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to use SQLite in EFS reliably? - Stack Overflow
After some trial and error I discovered it is a workable solution. It appears that the design will need to use APSWDatabase(..., ...
Read more >
Untitled
Hovering art directors blog, Metrocable picacho estaciones, Ragnar dc map, ... Brick print, Little boots nocturnes, Drop down menu in css examples?
Read more >
restless Documentation
So in case of our tutorial app, we'll place this code in a new posts/api.py file. We'll start with the most basic functional...
Read more >
Simple-Jekyll-Search - rubycoloredglasses
Place the following code in a file called search.json in the root of your Jekyll blog. This file will be used as a...
Read more >
boche.net – VMware vEvangelist
Namely an arbitrarily named Resource Pool and VM folder. Of course a vCenter Server, a Datacenter, a Datastore, and a Network (portgroup) must ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found