Hey man! Once again thanks for the great work!
I suspect there's some leaking of file descriptors or memory in tornado_subprocess. I couldn't repeat it so far, but our server (with both memory and CPU to spare) stats to give the error below:
OSError: [Errno 12] Cannot allocate memory
Stacktrace (most recent call last):
File "tornado/web.py", line 1021, in _stack_context_handle_exception
raise_exc_info((type, value, traceback))
File "tornado/web.py", line 1139, in wrapper
return method(self, _args, *_kwargs)
File "fightcode/web/handlers/fight.py", line 141, in get
vm.get_fight_results(*robot_objects)
File "fightcode/engine/v8.py", line 243, in get_fight_results
self.execute_file(vm_file.name, code_to_run_file.name, self.process_result)
File "fightcode/engine/tornado_vm.py", line 18, in execute_file
t.start()
File "tornado_subprocess/init.py", line 61, in start
self.pipe = subprocess.Popen(**self.args)
File "python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "python2.7/subprocess.py", line 1143, in _execute_child
self.pid = os.fork()
Any idea on what might be happening?
Cheers,