Server crashes constantly


I have a script that creates an image file. The image file is served by

After a certain time, when accessing the image served by the script I receive an error 'Unhandled exception'. At that point restarting the web instance is the only thing that makes the script work again.

What could be the problem?

Hi there -- it's hard to say without more information. Is there anything in the error log for the web app that's causing problems?

I've had some dodgy experiences involving image rendering using Image and pyfpdf under web2py - essentially what you described (long hang; eventual mysterious fail, then the web app needs to be restarted). I blame some bugginess in pyfpdf (and possibly Image) exacerbated by web2py's single-threaded nature, but I'm not quite sure exactly what the problem is. I managed a work-around by using JPGs instead of PNGs; they seem to be better supported by pyfpdf and Image.