Invalid (trancated) PDFs in Web application

Hall�chen!

I generate PDFs of scientific data with Matplotlib. This is done
automatically within a Web application written with Django. I
generate a PNG thumbnail, too, which always is correct, however, the
PDF is truncated in most cases.

Now I wonder whether it may be a timeout by the Web server or Django
itself. Thus, if Matplotlib takes too long (maybe due to cuncurrent
processes), it cannot write the full PDF. However, if it fails, the
truncation happens always at the same point in the file.

Here's a good PDF:
http://www-users.rwth-aachen.de/torsten.bronger/pds_okay.pdf

And this is the truncated version:
http://www-users.rwth-aachen.de/torsten.bronger/pds_truncated.pdf

Thus, this is the trailing part which is missing:
http://www-users.rwth-aachen.de/torsten.bronger/pds_missing.txt

Does anybody has an idea at which point and why Matplotlib stops
working?

Tsch�,
Torsten.

···

--
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bronger@...2202...