WebFaction
Community site: login faq

I just created a new django app in the webfaction control panel, using the latest, python3.3 and django 1.6 pair.

This creates an Apache server with mod_wsgi 3.4 and Python 3.3 installed running Django 1.6.

I've tested via runserver locally (created initially via django 1.6's startproject) and runs fine. I've posted my app to server, and testing with python3 and the shell, and runserver the app appears to load and models import without issue.

It's only when I try to actually access the page (no change after restarting apache) Checking my ~/logs/user/myapp_error.log I see the following:

[Tue Dec 10 13:53:46 2013] [error] [client 127.0.0.1] Premature end of script headers: wsgi.py

[Tue Dec 10 13:53:47 2013] [notice] child pid 25586 exit signal Segmentation fault (11)

The strange thing is that running a test wsgi hello world program gives me no issues:

import sys

def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    print('sys.prefix = {}'.format(repr(sys.prefix)), file=sys.stderr)
    print('sys.path = {}'.format(repr(sys.path)), file=sys.stderr)

    return [output]

I haven't added or changed anything in myapp/apache2/conf/httpd.conf other than to adjust the paths to myapp name. Note I have installed python3 libraries into ~/webapps/myapp/lib/python3.3, but like I said it's importing fine outside of apache.

If I had some kind of traceback to work with I could probably figure this out, but I'm stuck. It seems that many mod_wsgi Segfault issues point to compilation linking errors with apache/mod_wsgi, but that's something I don't have control over...

Any ideas on how to proceed with this would be helpful.

asked 10 Dec '13, 08:36

monkut
325
accept rate: 0%

This sounds like the type of error you might see if running very new software against very old libraries. Are you on a CentOS 6 server, or one of the older servers?

(10 Dec '13, 22:07) ryans ♦♦

just checked, looks like I'm on a centOS5 machine.

(11 Dec '13, 06:47) monkut

It's probably because you're on an older machine, running CentOS 5. You'll either need to stick with older applications or else migrate to a newer server. There's some work involved with migration, even for the automated migration option (specifically, updating apps), but there are also some significant benefits to the newer servers as well.

permanent link

answered 12 Dec '13, 02:58

ryans ♦♦
5.0k93360
accept rate: 43%

thanks! Yeah, sounds like the migration is a good idea. Better than trying to fight with the past.

(12 Dec '13, 08:05) monkut
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×55
×23

question asked: 10 Dec '13, 08:36

question was seen: 4,838 times

last updated: 12 Dec '13, 08:05

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM