Error file size


#1

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#2

Well, yes. Remove the RPM, publish it on an external server, change your recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com anasofia1072@gmail.com wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#3

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Well, yes. Remove the RPM, publish it on an external server, change your
recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it
is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com <
anasofia1072@gmail.com> wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#4

I don’t think so. The Chef Server is not intended to be used as a file serving mechanism. Cookbook files are for simple stuff — a static config file, a static public key of some sort, maybe a .rc file, etc.

Think about it for a second: you have a 350Mb file that you want to have as a part of your cookbook. After uploading it, you realise that there’s a small typo in a recipe. You fix it and re-upload it. Now this simple RPM is taking up 700Mb on your server. Escalate that to multiple versions and you begin to see the problem. In a way it’s akin to committing your compiled JARs to source control (in more than one way really, if you’re doing it right and keeping the cookbook on a VCS).

Binaries and big files are better served via HTTP, FTP or something else.

On Jul 28, 2014, at 11:24, Ana Ferreira anasofia1072@gmail.com wrote:

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal cassianoleal@gmail.com wrote:
Well, yes. Remove the RPM, publish it on an external server, change your recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com anasofia1072@gmail.com wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#5

that is not an issue:
“The upload argument is used to upload one or more cookbooks (and any files
that are associated with those cookbooks) from a local repository to the
Chef server. Only files that do not already exist on the Chef server will
be uploaded.” –http://docs.getchef.com/knife_cookbook.html

i couldn’t find where the cookbooks are on the chef server? i use de
default path (but dont what is the default path :slight_smile: )

thank you

On Mon, Jul 28, 2014 at 3:48 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

I don’t think so. The Chef Server is not intended to be used as a file
serving mechanism. Cookbook files are for simple stuff — a static config
file, a static public key of some sort, maybe a .rc file, etc.

Think about it for a second: you have a 350Mb file that you want to have
as a part of your cookbook. After uploading it, you realise that there’s a
small typo in a recipe. You fix it and re-upload it. Now this simple RPM is
taking up 700Mb on your server. Escalate that to multiple versions and you
begin to see the problem. In a way it’s akin to committing your compiled
JARs to source control (in more than one way really, if you’re doing it
right and keeping the cookbook on a VCS).

Binaries and big files are better served via HTTP, FTP or something else.

On Jul 28, 2014, at 11:24, Ana Ferreira anasofia1072@gmail.com wrote:

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Well, yes. Remove the RPM, publish it on an external server, change your
recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it
is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com <
anasofia1072@gmail.com> wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#6

Ah, sorry…

You were trying to upload the RPM by itself to the Chef Server?

That’s definitely not going to work. I thought the RPM was a cookbook file, as part of a cookbook. Cookbooks are the things you upload to the Chef Server. The RPM by itself will never get there.

Exactly what are you trying to achieve?

On Jul 28, 2014, at 13:09, Ana Ferreira anasofia1072@gmail.com wrote:

that is not an issue:
“The upload argument is used to upload one or more cookbooks (and any files that are associated with those cookbooks) from a local repository to the Chef server. Only files that do not already exist on the Chef server will be uploaded.” –http://docs.getchef.com/knife_cookbook.html

i couldn’t find where the cookbooks are on the chef server? i use de default path (but dont what is the default path :slight_smile: )

thank you

On Mon, Jul 28, 2014 at 3:48 PM, Cassiano Leal cassianoleal@gmail.com wrote:
I don’t think so. The Chef Server is not intended to be used as a file serving mechanism. Cookbook files are for simple stuff — a static config file, a static public key of some sort, maybe a .rc file, etc.

Think about it for a second: you have a 350Mb file that you want to have as a part of your cookbook. After uploading it, you realise that there’s a small typo in a recipe. You fix it and re-upload it. Now this simple RPM is taking up 700Mb on your server. Escalate that to multiple versions and you begin to see the problem. In a way it’s akin to committing your compiled JARs to source control (in more than one way really, if you’re doing it right and keeping the cookbook on a VCS).

Binaries and big files are better served via HTTP, FTP or something else.

On Jul 28, 2014, at 11:24, Ana Ferreira anasofia1072@gmail.com wrote:

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal cassianoleal@gmail.com wrote:
Well, yes. Remove the RPM, publish it on an external server, change your recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com anasofia1072@gmail.com wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#7

No, the rpm is part of a cookbook.
I am trying to upload the cookbook including rpm to the chef server. But i
don t know how to change the size limit on the chef server.

Do you any idea how to change it?

On Mon, Jul 28, 2014 at 11:50 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Ah, sorry…

You were trying to upload the RPM by itself to the Chef Server?

That’s definitely not going to work. I thought the RPM was a cookbook
file, as part of a cookbook. Cookbooks are the things you upload to the
Chef Server. The RPM by itself will never get there.

Exactly what are you trying to achieve?

On Jul 28, 2014, at 13:09, Ana Ferreira anasofia1072@gmail.com wrote:

that is not an issue:
“The upload argument is used to upload one or more cookbooks (and any
files that are associated with those cookbooks) from a local repository to
the Chef server. Only files that do not already exist on the Chef server
will be uploaded.” –http://docs.getchef.com/knife_cookbook.html

i couldn’t find where the cookbooks are on the chef server? i use de
default path (but dont what is the default path :slight_smile: )

thank you

On Mon, Jul 28, 2014 at 3:48 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

I don’t think so. The Chef Server is not intended to be used as a file
serving mechanism. Cookbook files are for simple stuff — a static config
file, a static public key of some sort, maybe a .rc file, etc.

Think about it for a second: you have a 350Mb file that you want to have
as a part of your cookbook. After uploading it, you realise that there’s a
small typo in a recipe. You fix it and re-upload it. Now this simple RPM is
taking up 700Mb on your server. Escalate that to multiple versions and you
begin to see the problem. In a way it’s akin to committing your compiled
JARs to source control (in more than one way really, if you’re doing it
right and keeping the cookbook on a VCS).

Binaries and big files are better served via HTTP, FTP or something else.

On Jul 28, 2014, at 11:24, Ana Ferreira anasofia1072@gmail.com wrote:

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Well, yes. Remove the RPM, publish it on an external server, change your
recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it
is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com <
anasofia1072@gmail.com> wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#8

Hi,

While I agree with the advice that files this big don’t belong in your
cookbook and should be on an artifact server somewhere, I also hate it
when a computer tells a human “no.”

The error message you are getting looks like it is coming directly
from nginx. Thus, I would start with putting:

nginx[‘client_max_body_size’] = “400m”

in your chef-server.rb file and then running a chef-server-ctl reconfigure

You can read about nearly all of the deep configuration options here:
http://docs.getchef.com/config_rb_chef_server_optional_settings.html

The request that is failing is likely going to the bookshelf service.
I wasn’t able to find any limits in bookshelf itself so the upload
might work after you tell nginx to allow uploads that big. Other
services such as erchef also have configurable limits, but that
service isn’t in play here.

This advice comes with no warranty :slight_smile:

Some other notes:

Think about it for a second: you have a 350Mb file that you want to have as a part of your cookbook. After uploading it, you realise that there’s a small typo in a recipe. You fix it and re-upload it. Now this simple RPM is taking up 700Mb on your server.

If the RPM hasn’t changed, it won’t be uploaded again. We only keep
one copy of a given file (for Enterprise/Hosted, one copy per
organization). A files is considered “the same” if it has the same
checksum.

Cheers,

Steven

On Tue, Jul 29, 2014 at 10:39 AM, Ana Ferreira anasofia1072@gmail.com wrote:

No, the rpm is part of a cookbook.
I am trying to upload the cookbook including rpm to the chef server. But i
don t know how to change the size limit on the chef server.

Do you any idea how to change it?

On Mon, Jul 28, 2014 at 11:50 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Ah, sorry…

You were trying to upload the RPM by itself to the Chef Server?

That’s definitely not going to work. I thought the RPM was a cookbook
file, as part of a cookbook. Cookbooks are the things you upload to the Chef
Server. The RPM by itself will never get there.

Exactly what are you trying to achieve?

On Jul 28, 2014, at 13:09, Ana Ferreira anasofia1072@gmail.com wrote:

that is not an issue:
“The upload argument is used to upload one or more cookbooks (and any
files that are associated with those cookbooks) from a local repository to
the Chef server. Only files that do not already exist on the Chef server
will be uploaded.” –http://docs.getchef.com/knife_cookbook.html

i couldn’t find where the cookbooks are on the chef server? i use de
default path (but dont what is the default path :slight_smile: )

thank you

On Mon, Jul 28, 2014 at 3:48 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

I don’t think so. The Chef Server is not intended to be used as a file
serving mechanism. Cookbook files are for simple stuff — a static config
file, a static public key of some sort, maybe a .rc file, etc.

Think about it for a second: you have a 350Mb file that you want to have
as a part of your cookbook. After uploading it, you realise that there’s a
small typo in a recipe. You fix it and re-upload it. Now this simple RPM is
taking up 700Mb on your server. Escalate that to multiple versions and you
begin to see the problem. In a way it’s akin to committing your compiled
JARs to source control (in more than one way really, if you’re doing it
right and keeping the cookbook on a VCS).

Binaries and big files are better served via HTTP, FTP or something else.

On Jul 28, 2014, at 11:24, Ana Ferreira anasofia1072@gmail.com wrote:

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Well, yes. Remove the RPM, publish it on an external server, change your
recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what it
is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com
anasofia1072@gmail.com wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.


#9

Hello Steven,

ty very much, this worked.

On Tue, Jul 29, 2014 at 12:48 PM, Steven Danna steve@opscode.com wrote:

Hi,

While I agree with the advice that files this big don’t belong in your
cookbook and should be on an artifact server somewhere, I also hate it
when a computer tells a human “no.”

The error message you are getting looks like it is coming directly
from nginx. Thus, I would start with putting:

nginx[‘client_max_body_size’] = “400m”

in your chef-server.rb file and then running a chef-server-ctl reconfigure

You can read about nearly all of the deep configuration options here:
http://docs.getchef.com/config_rb_chef_server_optional_settings.html

The request that is failing is likely going to the bookshelf service.
I wasn’t able to find any limits in bookshelf itself so the upload
might work after you tell nginx to allow uploads that big. Other
services such as erchef also have configurable limits, but that
service isn’t in play here.

This advice comes with no warranty :slight_smile:

Some other notes:

Think about it for a second: you have a 350Mb file that you want to have
as a part of your cookbook. After uploading it, you realise that there’s a
small typo in a recipe. You fix it and re-upload it. Now this simple RPM is
taking up 700Mb on your server.

If the RPM hasn’t changed, it won’t be uploaded again. We only keep
one copy of a given file (for Enterprise/Hosted, one copy per
organization). A files is considered “the same” if it has the same
checksum.

Cheers,

Steven

On Tue, Jul 29, 2014 at 10:39 AM, Ana Ferreira anasofia1072@gmail.com
wrote:

No, the rpm is part of a cookbook.
I am trying to upload the cookbook including rpm to the chef server. But
i
don t know how to change the size limit on the chef server.

Do you any idea how to change it?

On Mon, Jul 28, 2014 at 11:50 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

Ah, sorry…

You were trying to upload the RPM by itself to the Chef Server?

That’s definitely not going to work. I thought the RPM was a cookbook
file, as part of a cookbook. Cookbooks are the things you upload to the
Chef

Server. The RPM by itself will never get there.

Exactly what are you trying to achieve?

On Jul 28, 2014, at 13:09, Ana Ferreira anasofia1072@gmail.com wrote:

that is not an issue:
"The upload argument is used to upload one or more cookbooks (and any
files that are associated with those cookbooks) from a local repository
to

the Chef server. Only files that do not already exist on the Chef server
will be uploaded." –http://docs.getchef.com/knife_cookbook.html

i couldn’t find where the cookbooks are on the chef server? i use de
default path (but dont what is the default path :slight_smile: )

thank you

On Mon, Jul 28, 2014 at 3:48 PM, Cassiano Leal cassianoleal@gmail.com
wrote:

I don’t think so. The Chef Server is not intended to be used as a file
serving mechanism. Cookbook files are for simple stuff — a static
config

file, a static public key of some sort, maybe a .rc file, etc.

Think about it for a second: you have a 350Mb file that you want to
have

as a part of your cookbook. After uploading it, you realise that
there’s a

small typo in a recipe. You fix it and re-upload it. Now this simple
RPM is

taking up 700Mb on your server. Escalate that to multiple versions and
you

begin to see the problem. In a way it’s akin to committing your
compiled

JARs to source control (in more than one way really, if you’re doing it
right and keeping the cookbook on a VCS).

Binaries and big files are better served via HTTP, FTP or something
else.

On Jul 28, 2014, at 11:24, Ana Ferreira anasofia1072@gmail.com
wrote:

it must be a way to change that limit? or not?

On Mon, Jul 28, 2014 at 3:01 PM, Cassiano Leal <cassianoleal@gmail.com

wrote:

Well, yes. Remove the RPM, publish it on an external server, change
your

recipes to grab it from there and re-upload the cookbook.

There’s file size limit for cookbook files, but I can’t remember what
it

is. I’m sure someone else will chime in with the actual figure. :slight_smile:

Cheers
Cassiano

On Jul 28, 2014, at 10:47, anasofia1072@gmail.com
anasofia1072@gmail.com wrote:

Hello,

does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a

413 “Request Entity Too Large”

ERROR: Request Entity Too Large
Response:

413 Request Entity Too Large

413 Request Entity Too Large


nginx/1.4.4

i’m trying to upload a 350mb rpm file.