Skip to content

Commit

Permalink
Merge pull request #1073 from SickRage/threads-fix
Browse files Browse the repository at this point in the history
Fixes too many threads and VIRT memory
  • Loading branch information
miigotu committed Feb 26, 2016
2 parents 2f5e8ad + 2d7e561 commit beddbac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sickbeard/webserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@
from tornado.web import RequestHandler, HTTPError, authenticated
from tornado.gen import coroutine
from tornado.ioloop import IOLoop
from tornado.concurrent import run_on_executor

from concurrent.futures import ThreadPoolExecutor
from tornado.process import cpu_count

from tornado.concurrent import run_on_executor

from mako.runtime import UNDEFINED

mako_lookup = None
Expand Down Expand Up @@ -255,7 +259,7 @@ def __init__(self, *args, **kwargs):
super(WebHandler, self).__init__(*args, **kwargs)
self.io_loop = IOLoop.current()

executor = ThreadPoolExecutor(50)
executor = ThreadPoolExecutor(cpu_count())

@authenticated
@coroutine
Expand Down

0 comments on commit beddbac

Please sign in to comment.