Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase idle_timeout for SSE connections #4196

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Conversation

pawlooss1
Copy link
Member

This PR addresses Issue # 2754 (MIM-2100).

It increases idle_timeout in cowboy's requests options for all SSE connections (both REST and GraphQL) to 1 hour. This will ensure that client connections are not closed after 1 minute.

@pawlooss1 pawlooss1 linked an issue Dec 21, 2023 that may be closed by this pull request
@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 21, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 6584477
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / 6584477
Reports root / small


small_tests_26 / small_tests / 6584477
Reports root / small


small_tests_26_arm64 / small_tests / 6584477
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 6584477
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 6584477
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 6584477
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 6584477
Reports root/ big
OK: 4208 / Failed: 0 / User-skipped: 135 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 6584477
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 6584477
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 707 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 6584477
Reports root/ big
OK: 4238 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / 6584477
Reports root/ big
OK: 4285 / Failed: 0 / User-skipped: 110 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 6584477
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 6584477
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / 6584477
Reports root/ big
OK: 4609 / Failed: 0 / User-skipped: 130 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 6584477
Reports root/ big
OK: 4627 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5b8fd70) 84.24% compared to head (b2ad71e) 84.29%.
Report is 31 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4196      +/-   ##
==========================================
+ Coverage   84.24%   84.29%   +0.04%     
==========================================
  Files         551      551              
  Lines       33473    33475       +2     
==========================================
+ Hits        28201    28218      +17     
+ Misses       5272     5257      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pawlooss1 pawlooss1 marked this pull request as ready for review December 21, 2023 14:00
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see that there is an easy option to change. I added some comments.

test/common/mongoose_helper.erl Outdated Show resolved Hide resolved
test/common/mongoose_helper.erl Outdated Show resolved Hide resolved
src/mongoose_client_api/mongoose_client_api_sse.erl Outdated Show resolved Hide resolved
big_tests/tests/rest_client_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/graphql_sse_SUITE.erl Outdated Show resolved Hide resolved
src/graphql/mongoose_graphql_sse_handler.erl Outdated Show resolved Hide resolved
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 4, 2024

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / d7e12b6
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / d7e12b6
Reports root / small


small_tests_26 / small_tests / d7e12b6
Reports root / small


small_tests_26_arm64 / small_tests / d7e12b6
Reports root / small


ldap_mnesia_26 / ldap_mnesia / d7e12b6
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / d7e12b6
Reports root/ big
OK: 2269 / Failed: 1 / User-skipped: 847 / Auto-skipped: 0

sm_SUITE:ping_timeout
{error,{noproc,{gen_server,call,[<0.27769.1>,get_sm_h]}}}

Report log


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / d7e12b6
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / d7e12b6
Reports root/ big
OK: 4208 / Failed: 0 / User-skipped: 135 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / d7e12b6
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / d7e12b6
Reports root/ big
OK: 4238 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / d7e12b6
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 707 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / d7e12b6
Reports root/ big
OK: 4285 / Failed: 0 / User-skipped: 110 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / d7e12b6
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / d7e12b6
Reports root/ big
OK: 4609 / Failed: 0 / User-skipped: 130 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / d7e12b6
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / d7e12b6
Reports root/ big
OK: 4627 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 4, 2024

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 440c8cc
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / 440c8cc
Reports root / small


small_tests_26 / small_tests / 440c8cc
Reports root / small


small_tests_26_arm64 / small_tests / 440c8cc
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 440c8cc
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 440c8cc
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 440c8cc
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 440c8cc
Reports root/ big
OK: 4208 / Failed: 0 / User-skipped: 135 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 440c8cc
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / 440c8cc
Reports root/ big
OK: 4285 / Failed: 0 / User-skipped: 110 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 440c8cc
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 707 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 440c8cc
Reports root/ big
OK: 4238 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 440c8cc
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 440c8cc
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / 440c8cc
Reports root/ big
OK: 4609 / Failed: 0 / User-skipped: 130 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 440c8cc
Reports root/ big
OK: 4627 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I added a few minor comments.

test/common/config_parser_helper.erl Show resolved Hide resolved
big_tests/tests/rest_client_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/rest_client_SUITE.erl Outdated Show resolved Hide resolved
doc/configuration/listen.md Outdated Show resolved Hide resolved
pawlooss1 and others added 2 commits January 5, 2024 11:26
Co-authored-by: Paweł Chrząszcz <pawel.chrzaszcz@erlang-solutions.com>
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 5, 2024

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / b2ad71e
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / b2ad71e
Reports root / small


small_tests_26 / small_tests / b2ad71e
Reports root / small


small_tests_26_arm64 / small_tests / b2ad71e
Reports root / small


ldap_mnesia_25 / ldap_mnesia / b2ad71e
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / b2ad71e
Reports root/ big
OK: 4208 / Failed: 0 / User-skipped: 135 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / b2ad71e
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / b2ad71e
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / b2ad71e
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / b2ad71e
Reports root/ big
OK: 4238 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / b2ad71e
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 707 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / b2ad71e
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / b2ad71e
Reports root/ big
OK: 4285 / Failed: 0 / User-skipped: 110 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / b2ad71e
Reports root/ big
OK: 4609 / Failed: 0 / User-skipped: 130 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / b2ad71e
Reports root/ big
OK: 4627 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0

graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:end_per_group
{error,
 {{unregistering_failed,
   {amount,3},
   {unregistered_items,
  [{{<<"_admin_change_room_config_errors_1109">>,
     [{escalus_event_mgr,<0.25057.0>},
    {tc_name,admin_change_room_config_errors},
    {escalus_cleaner,<0.25056.0>},
    {watchdog,<0.25055.0>},
    {muc_light_host,<<"muclight.localhost">>},
    {secondary_muc_light_host,<<"muclight.localhost.bis">>},
    {protocol,http},
    {domain_admin,{<<"admin@localhost">>,<<"6cccac45695afbd0">>}},
    {schema_endpoint,domain_admin},
    {{ejabberd_cwd,mongooseim@localhost},
     "/home/circleci/project/_build/mim1/rel/mongooseim"},
    {preset,"odbc_mssql_mnesia"},
    {mim_data_dir,
     "/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE_data"},
    {tc_logfile,
     "https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4196/205108/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40ccc28f7e7cf8.2024-01-05_10.53.58/big_tests.tests.graphql_muc_light_SUITE.logs/run.2024-01-05_10.58.19/graphql_muc_light_suite.admin_change_room_config_errors.16773.html"},
    {tc_group_properties,[{name,domain_admin_muc_light}]},
    {tc_group_path,[[{name,domain_admin}]]},
    {data_dir,
     "/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_muc_light_SUITE_data/"},
    {priv_dir,
     "https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4196/205108/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40ccc28f7e7cf8.2024-01-05_10.53.58/big_tests.tests.graphql_muc_light_SUITE.logs/run.2024-01-05_10.58.19/log_private/"},
    {{saved_modules,mongooseim@localhost,<<"localhost">>},
     #{mod_vcard =>
      #{match...

Report log

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👌

@chrzaszcz chrzaszcz merged commit 882bf45 into master Jan 5, 2024
4 checks passed
@chrzaszcz chrzaszcz deleted the fix-sse-timeout branch January 5, 2024 12:55
@jacekwegr jacekwegr added this to the 6.2.1 milestone Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server Sent Events timeout
4 participants