2009/5/28 Tim Valenta <[email protected]>: > >> --- >> [Wed May 27 22:19:01 2009] [error] [client 255.255.255.0] mod_wsgi >> (pid=32484): Exception occurred within WSGI script '/a/website.nl/etc/ >> django.wsgi'. >> --- > > That part should be normal, as that's the entry point for Django to > come alive in such a setup.
It is normal in the sense it is the prelude to the error trace back that followed. If the error hadn't occurred that line wouldn't have come out though under normal circumstances. >> and there's also a Traceback which ends with "OperationalError: unable >> to open database file" (not sure where this comes from.. the path to >> the SQLite3 database file is set as absolute and the file is writable. >> (and it works in the rest of the site) > > This is clearly going to be the source of the issue, but the mixed > behavior adds an element of confusion... I assume that www-data (or > whoever your apache runs as) has at least group-level permissions on > the sqlite database file? I would check to make sure that it can > write to that file. Normal site usage might not be triggering the > problem if only reads are required. The admin changes lots of things > as you go (tracking your action history, login timestamps). > > Can you verify that apache has writing permissions to the file? > Hopefully the problem doesn't extend much deeper than that... At this > point, it's not so much a mod_wsgi thing as much as Apache > troubleshooting. For SQLite database, as well as having to use an absolute path name and the file being writable to user that application is running as, the directory also needs to be writable. There is a possibility that there may be a clash with mod_cache* modules in Apache, so also try disabling them. Exactly which may be affecting OP, cannot tell because they need to supply the complete traceback so can see where in Django code problem occurred. A Google on 'OperationalError mod_wsgi' also yields other things to check for. Graham > Tim > > On Wed, May 27, 2009 at 2:26 PM, Gijs Nijholt <[email protected]> wrote: >> >> On May 27, 6:01 pm, Tim Valenta <[email protected]> wrote: >> > So it fails under the /admin/ area, but does the rest of your site work at >> > all? If so, then your wsgi configuration above seems to work, and perhaps >> > the problem instead lies with some sort of semantic issue. >> >> Yes, the rest of the site works fine. On my local machine, the admin >> app works but is served through the built-in server.. >> (although I understand that AdminMediaHandler supposedly works in the >> same way) >> >> > >> > I'd definitely check your apache error log. Django will dump the >> > stacktrace >> > there, and often has been my only clue as to why something fails. What do >> > you find there? >> >> This is output in /var/log/apache2/error.log: >> --- >> [Wed May 27 22:19:01 2009] [error] [client 255.255.255.0] mod_wsgi >> (pid=32484): Exception occurred within WSGI script '/a/website.nl/etc/ >> django.wsgi'. >> --- >> and there's also a Traceback which ends with "OperationalError: unable >> to open database file" (not sure where this comes from.. the path to >> the SQLite3 database file is set as absolute and the file is writable. >> (and it works in the rest of the site) >> >> Can I get mod_wsgi to be a bit more specific about this 'exception' it >> encounters? >> >> >> > >> > (Additionally, once you can give the error a name and a place, you could >> > try >> > walking through it all manually in the python interpreter... executing your >> > wsgi file with python directly, importing the 'django' package, performing >> > various imports at or near the error in your apache error log, etc. It can >> > be easier to figure out the exact problem like that, instead of >> > guess-and-check methodology.) >> >> when I execute the wsgi file with python, nothing is displayed. >> in the python shell, I can import the django package without >> problems... >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
