The Devil's Number

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Devil's Number

lingwitt-2

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.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: The Devil's Number

lingwitt-2

On Feb 26, 4:04 pm, "lingwitt" <[hidden email]> 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.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: The Devil's Number

lingwitt-2

> 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.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---