Nginx/Unit sendfile failed for upstream

Sergey A. Osokin osa at freebsd.org.ru
Mon Jun 24 23:42:43 UTC 2019


On Mon, Jun 24, 2019 at 09:48:46AM -0400, Bartek wrote:
> Sergey A. Osokin Wrote:
> -------------------------------------------------------
> > % sudo curl -X PUT -d '{"http": { "max_body_size": 8388608} }'
> > --unix-socket \
> >  /path/to/control.unit.sock http://localhost/config/settings
> > 
> 
> OMG, it can't be that simple. So my doom was caused by "20M" instead of
> "20000000"...

In case you want to think in megabytes it's a bit tricky, but also works:

% echo "20*1024*1024" | bc | xargs -J % sudo curl -X PUT -d % \
 --unix-socket /var/run/unit/control.unit.sock http://localhost/config/settings/http/max_body_size 
{
        "success": "Reconfiguration done."
}

> Thanks a bunch Sergey and have a nice day.

Enjoy!

-- 
Sergey Osokin


More information about the nginx mailing list