zulip/zerver/lib
Tim Abbott 1396eb7022 Fix Tornado memory leak of handler objects.
In 2ea0daab19, handlers were moved to
being tracked via the handlers_by_id dict, but nothing cleared this
dict, resulting in every handler object being leaked.  Since a Tornado
process uses a different handler object for every request, this
resulted in a significant memory leak.  We fix this by clearing the
handlers_by_id dict in the two code paths that would result in a
Tornado handler being de-allocated: the exception codepath and the
handler disconnect codepath.

Fixes #463.
2016-03-17 18:33:59 -07:00
..
bugdown python3: Add missing utf-8 encoding/decoding in various places. 2016-03-08 09:14:15 -08:00
__init__.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
actions.py python3: Mark certain strings as unicode strings. 2016-03-08 09:14:11 -08:00
alert_words.py alert_words: Only fetch and cache non-null alert word sets. 2016-01-09 20:01:38 -08:00
avatar.py Allow overriding the default avatar image 2013-11-18 11:48:53 -05:00
bulk_create.py [schema] Add a bit for whether inactive users are mirror dummies. 2014-01-09 11:08:35 -05:00
cache.py Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import 2016-03-10 22:02:17 -08:00
cache_helpers.py Support filling memcached caches with no messages. 2013-11-13 12:07:16 -05:00
ccache.py Apply Python 3 futurize transform libmodernize.fixes.fix_unicode_type. 2015-11-01 09:35:06 -08:00
context_managers.py Use os.path directly rather than sometimes importing it separately. 2013-10-28 15:44:13 -04:00
create_user.py python3: Add missing utf-8 encoding/decoding in various places. 2016-03-08 09:14:15 -08:00
db.py Do query time tracking at the psycopg2 level instead of the Django level 2014-01-14 11:47:12 -05:00
debug.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
digest.py python3: Fix usage of .keys()/.values() to handle iterators. 2016-01-26 21:11:25 -08:00
email_mirror.py Apply Python 3 futurize transform libmodernize.fixes.fix_filter. 2015-11-01 09:26:16 -08:00
event_queue.py Fix Tornado memory leak of handler objects. 2016-03-17 18:33:59 -07:00
handlers.py Fix Tornado memory leak of handler objects. 2016-03-17 18:33:59 -07:00
html_diff.py Make built-in bots come from settings.py, and allow localserver-specific ones 2013-11-01 14:13:05 -04:00
initial_password.py python3: Add missing utf-8 encoding/decoding in various places. 2016-03-08 09:14:15 -08:00
logging_util.py DEPLOYED => PRODUCTION 2015-08-21 10:33:35 -07:00
mandrill_client.py ENTERPRISE => VOYAGER. 2015-08-21 10:33:35 -07:00
mention.py Clean up some unused imports. 2013-11-04 11:51:17 -05:00
migrate.py Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import. 2015-11-01 09:26:16 -08:00
narrow.py Add support for event queues with an included narrow. 2013-12-12 17:36:39 -05:00
notifications.py python3: Fix usage of .keys()/.values() to handle iterators. 2016-01-26 21:11:25 -08:00
parallel.py Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import. 2015-11-01 09:26:16 -08:00
push_notifications.py Exit without exception if this APNS attempt has no connection 2015-02-11 07:20:51 +00:00
query.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
queue.py Make rabbitmq, redis, and memcached configurable via user settings.py. 2016-01-21 22:07:56 -08:00
rate_limiter.py python3: Use zip from the six.moves package. 2016-01-26 21:11:24 -08:00
redis_utils.py Remove Redis remote authentication feature. 2015-08-20 21:58:59 -07:00
response.py Django 1.7 compatibility: miscellaneous changes 2015-08-20 23:01:26 -07:00
rest.py python3: Fix usage of .keys()/.values() to handle iterators. 2016-01-26 21:11:25 -08:00
session_user.py Django 1.8 compatibility: extracting the user from a session 2015-08-20 23:15:45 -07:00
socket.py Django 1.8 compatibility: extracting the user from a session 2015-08-20 23:15:45 -07:00
statistics.py Switch to using Python 3 style division everywhere. 2016-01-26 21:09:43 -08:00
test_helpers.py Remove duplicate self._log_data initialization. 2016-02-03 19:29:07 -08:00
test_runner.py Fix test_runner.py fast_test_only return type. 2016-02-03 19:29:44 -08:00
timeout.py Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six. 2015-11-01 09:35:06 -08:00
timestamp.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
tornado_ioloop_logging.py Fix various float initialization to use 0.0 instead of 0. 2016-02-03 19:29:07 -08:00
unminify.py Apply Python 3 futurize transform libmodernize.fixes.fix_map. 2015-11-01 09:35:05 -08:00
upload.py Migrate use of StringIO to Python 2+3 compatible six.moves.cStringIO. 2016-01-26 21:09:43 -08:00
user_agent.py Add script to parse user agents with historical data set. 2013-12-13 11:26:36 -05:00
utils.py Switch to using Python 3 style division everywhere. 2016-01-26 21:09:43 -08:00
validator.py Fix missing None in check_none_or return. 2016-02-03 19:25:18 -08:00