# Ktor: cause of cancelled, upstream prematurely closed?

**URL:** https://discuss.kotlinlang.org/t/ktor-cause-of-cancelled-upstream-prematurely-closed/12919
**Category:** Web Development
**Created:** [June 1, 2019, 10:47am UTC](https://discuss.kotlinlang.org/t/ktor-cause-of-cancelled-upstream-prematurely-closed/12919 "2019-06-01T10:47:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rnikander](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/rnikander/32/6881_2.png) [@rnikander](https://discuss.kotlinlang.org/u/rnikander)
#### Post date: [June 1, 2019, 10:47am UTC](https://discuss.kotlinlang.org/t/ktor-cause-of-cancelled-upstream-prematurely-closed/12919/1 "2019-06-01T10:47:07Z")

</div>

I’m seeing this occasionally in my nginx log:

> 13:05:20 [error] 4144#0: \*7074 upstream prematurely closed connection while sending to client, client: 192…, server: …, request: “GET /static/kotlin.js HTTP/1.1”, …

In the ktor log I see “_cancelled_”

> 13:05:20.541 [nettyCallPool-4-1] INFO ktor.application - 200 OK: GET - /static/kotlin.js, cancelled

Any idea why that happens? This is on my dev machine, an old Macbook Pro. I haven’t used this app yet enough on the “live” Linux servers to see if it shows up there too.

```
routing {
    ...            
    static("/static") {
        files(webDir)
    }
}

```

ktor version 1.2.1
