[PDB-2454] max-command-size default value is too small Created: 2016/02/19  Updated: 2016/04/20  Resolved: 2016/02/26

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: PDB 4.0.0
Fix Version/s: PDB 4.0.0

Type: Bug Priority: Major
Reporter: Reid Vandewiele Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to PDB-2396 Revise computation of default-max-com... Open
Story Points: 1
Sprint: PuppetDB 2016-03-09


Using a normal Puppet codebase on a small VM, it is very easy for catalogs to exceed the default max-command-size for PuppetDB. The following logs are an example run in the standard TSE environment, trying to compile a catalog for the Puppet Enterprise master.


[root@master ~]# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: [413 ] Command rejected due to size exceeding max-command-size
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run


2016-02-19 19:47:49,891 INFO  [p.p.command] [52a2a9c4-3b8d-4226-96e6-726d4169a301] [replace facts] master.inf.puppetlabs.demo
2016-02-19 19:47:54,921 WARN  [p.p.http] The root endpoint is experimental
2016-02-19 19:47:56,892 WARN  [p.p.http] The root endpoint is experimental
2016-02-19 19:48:05,540 WARN  [p.p.middleware] content-length of command is 1434722 bytes and is larger than the maximum allowed command size of 1242946 bytes
2016-02-19 19:48:06,048 INFO  [p.p.command] [a10a6119-755e-4282-848c-657b381d1a40] [store report] puppet v4.3.2 - master.inf.puppetlabs.demo

This should not occur under normal circumstances. The code and environment under which this error was generated is not an outlier in terms of how large catalogs get.

If a max-command-size is to exist, then regardless of how much memory PuppetDB is allocated there should be a minimum floor for the automatically configured max-command-size and it should be high enough that customers will not hit it except under extremely unusual circumstances.

Comment by Ryan Senior [ 2016/02/24 ]

The problem here is we don't have a good way to compute a number here on the max size. At this point with what we've seen, I think it will cause harm than it will prevent. The feature is still valuable (in my opinion) but I think we should discable max-command-size checks by default. Users can enable it if they run into problems.

Comment by Nick Walker [ 2016/02/24 ]


Generated at Wed Jun 26 23:10:29 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.