Kallithea issues archive

Issue #45: IOError: request data read error in HTTP_INTERNAL_SERVER_ERROR.html.var

Reported by: Thomas Güttler
State: invalid
Created on: 2014-09-30 10:16
Updated on: 2015-08-06 20:38

Description

Today we got this traceback:

[Tue Sep 30 11:54:33 2014] [error] [client 172.17.6.160] Premature end of script headers: wsgi.py
[Tue Sep 30 11:54:33 2014] [error] [client 172.17.6.160] mod_wsgi (pid=20025): Exception occurred processing WSGI script '/localhome/kallithea/apache/wsgi.py'.
[Tue Sep 30 11:54:33 2014] [error] [client 172.17.6.160] Traceback (most recent call last):
[Tue Sep 30 11:54:33 2014] [error] [client 172.17.6.160]   File "/localhome/kallithea/lib/python2.7/site-packages/paste/gzipper.py", line 38, in __call__
[Tue Sep 30 11:54:33 2014] [error] [client 172.17.6.160]     response.gzip_start_response)
[Tue Sep 30 11:54:33 2014] [error] [client 172.17.6.160]   File "/localhome/kallithea/lib/python2.7/site-packages/paste/cascade.py", line 107, in __call__
[Tue Sep 30 11:54:34 2014] [error] [client 172.17.6.160] no acceptable variant: /usr/share/apache2/error/HTTP_INTERNAL_SERVER_ERROR.html.var
[Tue Sep 30 11:54:34 2014] [error] [client 172.17.6.160]     f = StringIO(environ['wsgi.input'].read(length))
[Tue Sep 30 11:54:34 2014] [error] [client 172.17.6.160] IOError: request data read error

Version: Kallithea==0.1

Please tell me if you need more info.

Attachments

Comments

Comment by domruf, on 2014-09-30 10:32

can you send the content of your wsgi.py?

can you tell us what you did when this happend?

do you have problems when running kallithea with

paster serve production.ini

Comment by Thomas Güttler, on 2014-09-30 10:49

Here our wsgi.py

import os
import sys
import pwd

pwd_tuple=pwd.getpwuid(os.getuid())
home=pwd_tuple[5]

os.environ["HGENCODING"] = "UTF-8"
os.environ['PYTHON_EGG_CACHE'] = os.path.join(home, '.egg-cache')

# sometimes it's needed to set the curent dir
os.chdir(home)

import site
base_dir=os.path.join(home, 'lib/python%s' % sys.version[:3])
my_site_dir=os.path.join(base_dir, 'site-packages')
assert os.path.isdir(my_site_dir), my_site_dir
site.addsitedir(my_site_dir)
sys.path.append('/usr/lib/python%s' % sys.version[:3])
#assert 0, (sys.path, sys.version, os.getuid(), os.getgid())

from paste.deploy import loadapp
from paste.script.util.logging_config import fileConfig

ini_file=os.path.join(home, 'production.ini')
fileConfig(ini_file)
application = loadapp('config:%s' % ini_file)

can you tell us what you did when this happend?

No, looked into the logs for a different reason. We have automated processes which check out from git. I guess it was a git clone.

do you have problems when running kallithea with ..

No, everything is ok, Except from time to time there is a 500 (Internal Server error) during clone The above exception could be the reason. But I am not sure, since I can't reproduce it.

Comment by Mads Kiilerich, on 2014-09-30 11:04

I will bet that it just is because the client closed the connection prematurely. No bug there. Just some middleware that perhaps could calm down a bit.

Comment by Thomas De Schampheleire, on 2015-08-06 20:38

This is not believed to be a bug. Please reopen if you believe it is.