Commit f378c80a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

If we fail to allocate storage, it can be because the request is

too large to serve in one bite, so chop it down until we reach
fetch_chunksize before we start LRU flushing to make space for it.

Fixes #880
parent 3a56dbdd
......@@ -134,6 +134,11 @@ stv_alloc(const struct sess *sp, size_t size)
if (st != NULL)
break;
if (size > params->fetch_chunksize) {
size >>= 1;
continue;
}
/* no luck; try to free some space and keep trying */
if (EXP_NukeOne(sp, stv->lru) == -1)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment