rosedu/vmchecker

getCourses returns 500 on many requests

teosz opened this issue · 0 comments

teosz commented

Vmchecker doesn't scale well, a lots of requests made the cache from mod_python crash:

MOD_PYTHON ERROR

ProcessId:      6022
Interpreter:    'elf.cs.pub.ro'

ServerName:     'elf.cs.pub.ro'
DocumentRoot:   '/var/www/'

URI:            '/vmchecker/services/services.py/getCourses'
Location:       None
Directory:      '/home/vmchecker/public_html/'
Filename:       '/home/vmchecker/public_html/services/services.py'
PathInfo:       '/getCourses'

Phase:          'PythonHandler'
Handler:        'mod_python.publisher'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.7/dist-packages/mod_python/publisher.py", line 204, in handler
    module = page_cache[req]

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1059, in __getitem__
    return import_module(req.filename)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 296, in import_module
    log, import_path)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 680, in import_module
    execfile(file, module.__dict__)

  File "/home/vmchecker/public_html/services/services.py", line 26, in <module>
    from mod_python import Session

  File "/usr/lib/python2.7/dist-packages/mod_python/Session.py", line 40, in <module>
    tempdir = tempfile.gettempdir()

  File "/usr/lib/python2.7/tempfile.py", line 261, in gettempdir
    tempdir = _get_default_tempdir()

  File "/usr/lib/python2.7/tempfile.py", line 208, in _get_default_tempdir
    ("No usable temporary directory found in %s" % dirlist))

IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']


MODULE CACHE DETAILS

Accessed:       Sun Jan  7 23:50:43 2018
Generation:     0

_mp_7c7d39a0eeab21582263688acebd40ff {
  FileName:     '/home/vmchecker/public_html/services/services.py'
  Instance:     1 [IMPORT]
  Generation:   0 [ERROR]
  Modified:     Thu Mar 17 16:50:03 2016
}