The Devil's Number

3 views
Skip to first unread message

lingwitt

unread,
Feb 26, 2007, 4:04:22 PM2/26/07
to cherrypy-devel
I already submitted the following to the users' group,
but there hasn't been any interest.

The following works:
import cherrypy

devils_number = 66608

class HelloWorld(object):
@cherrypy.expose
def index(self):
return 't' * devils_number

cherrypy.quickstart(HelloWorld())

Now run it with:

devils_number = 66609

and the server (at least on my system) produces this error:
(This only happens when accessing the server from another computer)

...
File "/path/to/site-packages/cherrypy/wsgiserver/__init__.py", line
392, in simple_response
self.sendall("".join(buf))
File "<string>", line 1, in sendall
error: (35, 'Resource temporarily unavailable')

The point is:
It seems that there is a maximum size (66608).
I came across this problem while trying to return an image
directly.

Is there no way around this besides creating temporary files
and returning an HTML page with an image embedded?

Thanks.

lingwitt

unread,
Feb 26, 2007, 7:11:05 PM2/26/07
to cherrypy-devel
On Feb 26, 4:04 pm, "lingwitt" <lingw...@gmail.com> wrote:
> The point is:
> It seems that there is a maximum size (66608).
> I came across this problem while trying to return an image
> directly.
>
> Is there no way around this besides creating temporary files
> and returning an HTML page with an image embedded?
>
> Thanks.

It gets even stranger!

After not getting any 'print' output from simple_response on line 378
in wsgiserver/__init__.py, I realized that method isn't even being
called!

In fact, I removed that method entirely from the file, and the server
still functioned properly (still giving me the problems). The only
difference was that no error message was given anymore. This doesn't
make any sense!

What?

Could developers please pipe in and let me know what's going on.
Thanks.

lingwitt

unread,
Feb 28, 2007, 3:59:15 AM2/28/07
to cherrypy-devel
> It gets even stranger!
>
> After not getting any 'print' output from simple_response on line 378
> in wsgiserver/__init__.py, I realized that method isn't even being
> called!
>
> In fact, I removed that method entirely from the file, and the server
> still functioned properly (still giving me the problems). The only
> difference was that no error message was given anymore. This doesn't
> make any sense!
>
> What?

After doing a lot of research, I found that "Resource temporarily
unavailable"
is supposed to have the error code 10 or 11, not 35. I copied
everything over
from a PowerPC macintosh to an x86 linux machine and the problems went
away.

Apparently Mac OS X has some problems.

Reply all
Reply to author
Forward
0 new messages