# Large header suddenly received on signin

**URL:** <https://community.auth0.com/t/large-header-suddenly-received-on-signin/72718>\
**Category:** Get Help\
**Tags:** header, nginx\
**Created:** [November 7, 2021, 7:48am UTC](https://community.auth0.com/t/large-header-suddenly-received-on-signin/72718 "2021-11-07T07:48:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DS911](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ds911/32/30912_2.png) [@DS911](https://community.auth0.com/u/DS911)\
**Post date:** [November 7, 2021, 7:48am UTC](https://community.auth0.com/t/large-header-suddenly-received-on-signin/72718/1 "2021-11-07T07:48:12Z")

</div>

I’m using nginx and suddenly receiving the same error message mentioned on several forums about a large header being sent back from the “signin-oidc” route:

> <https://github.com/auth0/express-openid-connect/issues/143>
>
> Hi,
> 
> Thank you for your work on v2.
> In my use case I need to call userinfo an…d the v2 api \[makes it really simple\](https://github.com/auth0/express-openid-connect/blob/master/EXAMPLES.md#6-calling-userinfo). In v1 I have to keep around users' tokenset with express-session for example.
> 
> The issue I have is the size of the appSession cookies (plural because they are chunked in several cookies).
> !\[image\](https://user-images.githubusercontent.com/781471/94672769-0308bc00-0316-11eb-8a2d-9792f73300b1.png)
> A bit more than 4k in my case, is it due to my setup? (I guess a tokenset is stored in the cookies which explains the simplified userinfo api). V1 appSession cookies are ~500 bytes. 
> For each request+response from the browser to the api the cookies are sent as part of the request and updated cookies are sent from the api.
> I think I wouldn't have noticed immediately but the default configuration of nginx (used as reverse proxy in front of the api) doesn't let these large headers go through: (due to the cookie size I think)
> \`\`\`
> \[error\] 27#27: \*897 upstream sent too big header while reading response header from upstream, client: 172.18.0.1, server: , request: "POST /api/auth/callback HTTP/1.1", upstream: "http://172.18.0.5:3001/api/auth/callback"
> \`\`\`
> nginx can be configured to allow this using for example:
> \`\`\`conf
> proxy\_buffer\_size 128k;
> proxy\_buffers 4 256k;
> proxy\_busy\_buffers\_size 256k;
> \`\`\`
> 
> What do you think about it?
> The tokenset has to be stored somewhere but it's not always needed for very simple usecases right?

> <https://stackoverflow.com/questions/42613491/azure-ad-webapp-behind-reverse-proxy-receives-502-bad-gateway>

I have changed the nginx configuration file a number of times to no avail and don’t expect specific help on that here, but I would like to know what could’ve possibly resulted in the response suddenly jumping up in size when I’ve made no changes in auth0? This started happening in the last 5-7 days.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 15, 2021, 9:42pm UTC](https://community.auth0.com/t/large-header-suddenly-received-on-signin/72718/3 "2021-11-15T21:42:03Z")

</div>

Hi @DS911,

I’m not seeing any similar reports or issues being reported on our side.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 20, 2022, 11:04pm UTC](https://community.auth0.com/t/large-header-suddenly-received-on-signin/72718/4 "2022-01-20T23:04:19Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
