Mailing List Archive

HTTP error code in case of workspace overflow
Hello all,

I was looking on this <https://www.varnish-software.com/developers/tutorials/troubleshooting-varnish/#not-enough-workspace-memory> Varnish troubleshooting guide, section "Not enough workspace memory".
There is info that Varnish should return 503 HTTP code when there is overflow:

When a task consumes more memory than allowed in one of the specific workspace contexts, the transaction is aborted, and an HTTP 503 response is returned. When a workspace_session overflow occurs, the connection will be closed.

Additionally I noticed this PR <https://varnish-cache.org/lists/pipermail/varnish-commit/2015-September/014327.html> where is mentioned that Varnish should return 500 in case of overflow which kinda make sense ...

I tracked this change to current master and there is still 500 code:
https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/http/cache_http1_deliver.c#L130
https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/http1/cache_http1_deliver.c#L77

The question obviously is if the DOC talks about something different or the code should be adjusted.

Thx
BR
Re: HTTP error code in case of workspace overflow [ In reply to ]
Hi,

On Wed, Aug 24, 2022 at 9:26 AM <findmyname@tutanota.com> wrote:
>
> Hello all,
>
> I was looking on this Varnish troubleshooting guide, section "Not enough workspace memory".
> There is info that Varnish should return 503 HTTP code when there is overflow:
>
> When a task consumes more memory than allowed in one of the specific workspace contexts, the transaction is aborted, and an HTTP 503 response is returned. When a workspace_session overflow occurs, the connection will be closed.
>
> Additionally I noticed this PR where is mentioned that Varnish should return 500 in case of overflow which kinda make sense ...
>
> I tracked this change to current master and there is still 500 code:
> - https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/http/cache_http1_deliver.c#L130
> - https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/http1/cache_http1_deliver.c#L77
>
> The question obviously is if the DOC talks about something different or the code should be adjusted.

Excellent detective work. The documentation should be adjusted.

I reported your finding to the developer portal team and we will
figure out a communication channel to report issues directly related
to the portal itself.

Thanks,
Dridi
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc