sfu-natlang / lensingwikipedia

Lensing Wikipedia is an interface to visually browse through human history as represented in Wikipedia. This the source code that runs the website:
http://lensingwikipedia.cs.sfu.ca
Other
11 stars 4 forks source link

backend bugs from log file #163

Closed anoopsarkar closed 9 years ago

anoopsarkar commented 9 years ago

Here is a common error message I found in the log file for the backend:

142.58.53.3 - - [10/Feb/2015 15:27:12] "POST / HTTP/1.1" 200 17986974
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/wsgiref/handlers.py", line 86, in run
    self.finish_response()
  File "/usr/local/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
    self.write(data)
  File "/usr/local/lib/python2.7/wsgiref/handlers.py", line 217, in write
    self._write(data)
  File "/usr/local/lib/python2.7/socket.py", line 324, in write
    self.flush()
  File "/usr/local/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
142.58.53.3 - - [10/Feb/2015 15:27:12] "POST / HTTP/1.1" 500 59
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/local/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/local/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/local/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/local/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/local/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
anoopsarkar commented 9 years ago

Here is another which may be unrelated:

request at 2015-02-10 18:38:51.080532
query response failed:
Traceback (most recent call last):
  File "/var/www/html/checkouts/20150205/domains/wikipediahistory/backend/backend", line 204, in app
    response = json.dumps(state.querier.handle(query))
  File "/var/www/html/checkouts/20150205/domains/wikipediahistory/backend/queries.py", line 457, in handle
    for view_id in query['views']:
KeyError: 'views'
anoopsarkar commented 9 years ago

And another error in the log:

request at 2015-02-10 18:38:51.258353
handling view "1" of type "countbyfieldvalue": using cache
handling view "0" of type "descriptions": using cache
handling view "3" of type "countbyfieldvalue": generating view
handling view "2" of type "countbyfieldvalue": generating view
handling view "4" of type "countbyfieldvalue": generating view
generating field counts for fields: currentCountryText personText locationText
whoosh search results: <Top 86720 Results for Every(None, boost=1.0) runtime=0.532486200333>
error while generating count views:
Traceback (most recent call last):
  File "/var/www/html/checkouts/20150205/domains/wikipediahistory/backend/queries.py", line 316, in generate_views
    self.generate_field_counts(response, field_count_views, whoosh_query)
  File "/var/www/html/checkouts/20150205/domains/wikipediahistory/backend/queries.py", line 145, in generate_field_counts
    if field in hit:
  File "/usr/local/lib/python2.7/site-packages/whoosh/searching.py", line 1513, in __contains__
    or self.reader.has_column(key))
  File "/usr/local/lib/python2.7/site-packages/whoosh/reading.py", line 1271, in has_column
    return any(r.has_column(fieldname) for r in self.readers)
  File "/usr/local/lib/python2.7/site-packages/whoosh/reading.py", line 1271, in <genexpr>
    return any(r.has_column(fieldname) for r in self.readers)
  File "/usr/local/lib/python2.7/site-packages/whoosh/reading.py", line 887, in has_column
    coltype = self.schema[fieldname].column_type
  File "/usr/local/lib/python2.7/site-packages/whoosh/fields.py", line 1197, in __getitem__
    raise KeyError("No field named %r" % (name,))
KeyError: "No field named u'currentCountryText'"
not caching due to error
not caching due to error
not caching due to error
theq629 commented 9 years ago

The first message is probably the frontend being closed while it's waiting for a reply from the backend. The second one is probably similar, but I'll look more.

The third is something using an old field name.

anoopsarkar commented 9 years ago

I tried to find what is sending currentCountryText from the frontend but couldn't find anything.

theq629 commented 9 years ago

It could be cache priming settings in the backend or domain config too (I'm not at home to grep).

theq629 commented 9 years ago

I can't find any sign of it in the current code, so that's strange. Is there any chance of old domain config files or an old frontend connecting?

anoopsarkar commented 9 years ago

Does not seem to be an issue anymore. Closing.