[Answered ]-Django and fcgi and mod_fcgid errors


There appears to be a segmentation fault occurring somewhere — according to the last line in your error log. This shouldn’t happen with Python code, so I’d start by looking at the code to stdimage2 to see what else is in there.

A quick perusal of the source suggests that it’s all Python as well, and that the only external library that it depends on is PIL. PIL is a C library (at least part of it), so it’s possible that that is where the error is occurring, especially if, as you say, the fields are renamed, but the resized images are not being created.

How was PIL installed on the server? If it was installed through a package manager, or compiled right on the server itself, then it might be necessary to update it, or recompile. If you copied the module from your development machine, then there may be a conflict there (different libraries, different processor architecture, etc.)

The other way I would go about troubleshooting this is from a python shell, rather than through the web interface. Try to load your model and trigger the save() that seems to be failing. If the shell terminates with a segmentation fault, then try it again, but this time single-stepping with a debugger. (I would actually put a pdb breakpoint on StdImageField._resize_image, and run the code until it hit that breakpoint.)

I don’t think there’s an easier way to debug this; there doesn’t seem to be anything obvious in your code that would cause it, so it’s looking like something on the server itself.

Leave a comment