# Uploads break on HTTPS with HTTP2 enabled

**URL:** <https://forum.elixirforum.com/t/uploads-break-on-https-with-http2-enabled/32451>\
**Category:** Questions / Help (archived)\
**Tags:** phoenix, cowboy, ssl, chrome, https\
**Created:** [June 18, 2020, 1:05pm UTC](https://forum.elixirforum.com/t/uploads-break-on-https-with-http2-enabled/32451 "2020-06-18T13:05:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yurko](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/yurko/32/2369_2.png) [@yurko](https://forum.elixirforum.com/u/yurko)\
**Post date:** [June 18, 2020, 1:05pm UTC](https://forum.elixirforum.com/t/uploads-break-on-https-with-http2-enabled/32451/1 "2020-06-18T13:05:39Z")

</div>

I recently had to deal with a strage bug: Reported were uploads that break with a net::ERR\_CONNECTION\_CLOSED.

Some debugging let us clarify this issue: That only happens in Chrome / Chromium (Firefox works fine), only via HTTPS, and only with reasonably large (around 5mb+) files. I also strongly assume that it only happens with HTTP2 enabled, so basically this problem [https://stackoverflow.com/questions/38752691/neterr-connection-closed-error-at-chrome-with-http2-0-nginx](https://stackoverflow.com/questions/38752691/neterr-connection-closed-error-at-chrome-with-http2-0-nginx), the author has it with nginx and Chrome 51 in 2017, I had it recently with Chromium 83. Server does not register any errors, the browser just seems to not wait for response.

According to the linked thread [https://serverfault.com/questions/775298/debian-jessie-nginx-with-openssl-1-0-2-to-use-alpn-rather-than-npn](https://serverfault.com/questions/775298/debian-jessie-nginx-with-openssl-1-0-2-to-use-alpn-rather-than-npn) it’s about nginx using older openssl, Erlang though has it’s own SSL management and as far as I can tell it supports ALPN [ssl — OTP 29.0.2 (ssl 11.7.2)](https://erlang.org/doc/man/ssl.html)

The fact that it only happens while uploading bigger files and not all the time also seems a bit odd, doesn’t look like an issue with supporting or not supporting something, more like a bug.

I found this ticket [Add proper HTTP/2 TLS configuration by default in cowboy:start\_tls · Issue #1332 · ninenines/cowboy · GitHub](https://github.com/ninenines/cowboy/issues/1332) which led me to few guides like this one [Increasing security in Erlang and Elixir SSL applications – Primordial Echo](http://ezgr.net/increasing-security-erlang-ssl-cowboy/) but they seem a bit generic.

I wonder if anyone in the community had that problem. Is it about the runtime version? Or do I need to set some options? Disabling HTTP2 (downgrading cowboy) for that reason seems a bit weird.

The affected project has Elixir 1.10 and Erlang 22 with Cowboy 2.7.0:

```elixir
Erlang/OTP 22 [erts-10.7.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Elixir 1.10.3 (compiled with Erlang/OTP 21)

```
