# Random 502 in POST request

**URL:** <https://discuss.konghq.com/t/random-502-in-post-request/7423>\
**Category:** General\
**Created:** [November 10, 2020, 4:11pm UTC](https://discuss.konghq.com/t/random-502-in-post-request/7423 "2020-11-10T16:11:17Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![thibaultcha](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/thibaultcha/32/340_2.png) [@thibaultcha](https://discuss.konghq.com/u/thibaultcha)\
**Post date:** [November 24, 2020, 7:20pm UTC](https://discuss.konghq.com/t/random-502-in-post-request/7423/7 "2020-11-24T19:20:08Z")

</div>

> [@502 & Keepalive connection closed, AWS/CloudFront + classic LB + Kong (K8s)](https://discuss.konghq.com/t/502-keepalive-connection-closed-aws-cloudfront-classic-lb-kong-k8s/7397/6):
>
> An HTTP 502 error means that a server received an invalid response from another server. In this case, Kong received an invalid response from your upstream. It is all explained in the log really: upstream prematurely closed connection while reading response headers. Your upstream prematurely closed the connection while Kong was patiently expecting its response. In order to resolve this, you will have to investigate this from the upstream, see if any errors occurred there (since the issue arises …

---

_[View the full topic](https://discuss.konghq.com/t/random-502-in-post-request/7423)._
