Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
Go to file
Mateusz Mandera a7ec1a089c errors: Fix infinite recursion during memcached outages.
We have a very useful piece of code, _RateLimitFilter, which is
designed to avoid sending us a billion error emails in the event that
a Zulip production server is down in a way that throws the same
exception a lot. The code uses memcached to ensure we send each
traceback roughly once per Zulip server per 10 minutes (or if
memcached is unavailable, at most 1/process/10 minutes, since we use
memcached to coordinate between processes)

However, if memcached is down, there is a logging.error call internal
to the Django/memcached setup that happens inside the cache.set() call,
and those aren't caught by the `except Exception` block around it.

This ends up resulting in infinite recursion, eventually leading to
Fatal Python error: Cannot recover from stack overflow., since this
handler is configured to run for logging.error in addition to
logging.exception.

We fix this using a thread-local variable to detect whether we are
being called recursively.

This change should prevent some nasty failure modes we've had in the
past where memcached being down resulted in infinite recursion
(resulting in extra resources being consumed by our error
notifications code, and most importantly, the error notifications not
being sent).

Fixes #12595.
2019-09-03 11:44:39 -07:00
.circleci circleci: Store XUnit test results. 2019-07-07 22:31:11 -07:00
.github github: Suggest GIFs too in PR template. 2018-02-16 09:59:22 -08:00
.tx cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
analytics analytics: Clean up type ignores. 2019-08-09 16:39:16 -07:00
confirmation analytics/zilencer/zproject: Remove unused imports. 2019-02-02 17:31:45 -08:00
corporate requirements: Upgrade stripe pip package from 2.21.0 to 2.35.0. 2019-08-19 11:09:33 -07:00
docs setup-apt-repo: Remove PPA and packagecloud repository. 2019-08-29 12:53:04 -07:00
frontend_tests settings: Add FAKE_EMAIL_DOMAIN setting. 2019-08-30 14:59:00 -07:00
locale i18n: Update translation data from transifex. 2019-08-07 15:15:28 -07:00
pgroonga migrations: Remove unused imports. 2019-02-02 17:01:04 -08:00
puppet search: Remove now unnecessary tsearch_extra dependency. 2019-08-29 12:49:26 -07:00
requirements requirements: Upgrade pip-tools to 4.1.0 and pip to 19.2.3. 2019-08-26 14:33:18 -07:00
scripts parse_os_release: Use /etc/os-release always; remove DISTRIB_FAMILY. 2019-08-29 17:30:20 -07:00
static styles: Remove stray semicolon from input.user_status block. 2019-09-02 21:45:43 -07:00
stubs mypy: Remove daemon mode. 2019-08-25 15:04:12 -07:00
templates docs: Expand documentation on using IDs in narrows. 2019-08-29 16:17:09 -07:00
tools webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00
zerver errors: Fix infinite recursion during memcached outages. 2019-09-03 11:44:39 -07:00
zilencer custom fields: Add default external account custom fields. 2019-08-28 15:35:53 -07:00
zproject settings: Add FAKE_EMAIL_DOMAIN setting. 2019-08-30 14:59:00 -07:00
zthumbor zthumbor: Clean up type ignores. 2019-08-09 17:42:33 -07:00
.babelrc webpack: Transpile JS code with Babel. 2019-07-22 17:55:32 -07:00
.browserslistrc webpack: Transpile JS code with Babel. 2019-07-22 17:55:32 -07:00
.codecov.yml codecov: Change threshold to use percentage syntax. 2019-07-20 14:37:04 -07:00
.editorconfig .editorconfig: Fix invalid brace patterns. 2019-07-03 14:40:56 -07:00
.eslintignore typescript: Use ESLint instead of TSLint. 2019-04-13 11:42:47 -07:00
.eslintrc.json data export: Add UI to trigger data export. 2019-08-12 18:21:38 -07:00
.gitattributes Revert "gitattributes: Mark yarn.lock as "binary", i.e. suppress diffs." 2019-05-20 19:31:14 -07:00
.gitignore i18n: Move static/locale back to locale. 2019-07-02 14:57:55 -07:00
.gitlint lint: Allow revert commit messages in gitlint. 2018-02-13 09:21:01 -08:00
.isort.cfg tornado: Fix logging of tornado activity level. 2018-04-17 15:59:01 -07:00
.npmignore Add proxy notes to new README.dev.md troubleshooting section. 2016-03-29 21:54:05 -07:00
.stylelintrc lint: Ban color names in CSS. 2019-01-22 15:33:18 -08:00
.travis.yml ci: Move backend and production tests to Ubuntu 16.04 (xenial). 2019-05-24 17:07:15 -07:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
CODE_OF_CONDUCT.md docs: Add clarifying comma in CODE_OF_CONDUCT.md. 2019-04-05 18:01:37 -07:00
CONTRIBUTING.md docs: Mention twitter account as alternative to mailing list. 2019-05-20 15:21:15 -07:00
Dockerfile-postgresql search: Remove now unnecessary tsearch_extra dependency. 2019-08-29 12:49:26 -07:00
LICENSE license: Move license application notice from LICENSE to NOTICE. 2018-10-02 12:04:44 -07:00
manage.py manage.py: Revert sabotaging pika.adapters.twisted_connection import. 2019-01-31 10:04:28 -08:00
mypy.ini mypy: In non-daemon mode, follow package imports. 2019-08-16 14:13:40 -07:00
NOTICE license: Move license application notice from LICENSE to NOTICE. 2018-10-02 12:04:44 -07:00
package.json webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00
postcss.config.js webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00
README.md ci: Remove Ubuntu 14.04 (trusty) from CI. 2019-06-26 11:01:13 -07:00
Vagrantfile Revert "vagrant: Add NFS backend for file synchronization for OSX." 2019-08-12 16:04:00 -07:00
version.py webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00
yarn.lock webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00

Zulip overview

Zulip is a powerful, open source group chat application that combines the immediacy of real-time chat with the productivity benefits of threaded conversations. Zulip is used by open source projects, Fortune 500 companies, large standards bodies, and others who need a real-time chat system that allows users to easily process hundreds or thousands of messages a day. With over 500 contributors merging over 500 commits a month, Zulip is also the largest and fastest growing open source group chat project.

CircleCI branch Travis Build Status Coverage Status Mypy coverage GitHub release docs Zulip chat Twitter

Getting started

Click on the appropriate link below. If nothing seems to apply, join us on the Zulip community server and tell us what's up!

You might be interested in:

You may also be interested in reading our blog or following us on twitter. Zulip is distributed under the Apache 2.0 license.