# Debugging Chef errors

**URL:** <https://discourse.chef.io/t/debugging-chef-errors/5398>\
**Category:** Chef Infra (archive)\
**Created:** [June 11, 2014, 5:35pm UTC](https://discourse.chef.io/t/debugging-chef-errors/5398 "2014-06-11T17:35:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Fischer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/michael_fischer/32/136_2.png) [@Michael\_Fischer](https://discourse.chef.io/u/Michael_Fischer)\
**Post date:** [June 11, 2014, 5:35pm UTC](https://discourse.chef.io/t/debugging-chef-errors/5398/1 "2014-06-11T17:35:59Z")

</div>

Hi folks,

We recently upgraded to Chef Server 11.1.1 and are still occasionally  
seeing erchef errors like:

Dreaded “no connections” error:

2014-06-11 17:22:03.351 [error] {\<\<“method=POST; path=/search/node;  
status=500;  
”\>\>,{error,{error,function\_clause,[{chef\_wm\_search,’-make\_bulk\_get\_fun/5-lc$^2/1-0-’,[{error,no\_connections},#Fun\<chef\_wm\_routes.3.34923093\>,[{\<\<“name”\>\>,[\<\<“name”\>\>]},{\<\<“hostname”\>\>,[\<\<“hostname”\>\>]},{\<\<“fqdn”\>\>,[\<\<“fqdn”\>\>]},{\<\<“ipaddress”\>\>,[\<\<“ipaddress”\>\>]},{\<\<“rsa”\>\>,[\<\<“keys”\>\>,\<\<“ssh”\>\>,\<\<“host\_rsa\_public”\>\>]},{\<\<“dsa”\>\>,[\<\<“keys”\>\>,\<\<“ssh”\>\>,\<\<“host\_dsa\_public”\>\>]}],node],[{file,“src/chef\_wm\_search.erl”},{line,336}]},{chef\_wm\_search,fetch\_result\_rows,4,[{file,“src/chef\_wm\_search.erl”},{line,447}]},{chef\_wm\_search,make\_search\_results,5,[{file,“src/chef\_wm\_search.erl”},{line,414}]},{chef\_wm\_search,to\_json,2,[{file,“src/chef\_wm\_search.erl”},{line,131}]},{chef\_wm\_search,process\_post,2,[{file,“src/chef\_wm\_search.erl”},{line,271}]},{webmachine\_resource,resource\_call,3,[{file,“src/webmachine\_resource.erl”},{line,186}]},{webmachine\_resource,do,3,[{file,“src/webmachine\_resource.erl”},{line,142}]},{webmachine\_decision\_core,resource\_call,1,[{file,“src/webmachine\_decision\_core.erl”},{line,48}]}]}}}

“badrecord” error:

2014-06-11 17:21:00.154 [error] {\<\<“method=POST;  
path=/environments/production/cookbook\_versions; status=500;  
”\>\>,{error,{error,{badrecord,chef\_cookbook\_version},[{chef\_wm\_depsolver,’-assemble\_response/3-lc$^0/1-0-’,2,[{file,“src/chef\_wm\_depsolver.erl”},{line,291}]},{chef\_wm\_depsolver,’-assemble\_response/3-lc$^0/1-0-’,2,[{file,“src/chef\_wm\_depsolver.erl”},{line,293}]},{chef\_wm\_depsolver,assemble\_response,3,[{file,“src/chef\_wm\_depsolver.erl”},{line,291}]},{webmachine\_resource,resource\_call,3,[{file,“src/webmachine\_resource.erl”},{line,186}]},{webmachine\_resource,do,3,[{file,“src/webmachine\_resource.erl”},{line,142}]},{webmachine\_decision\_core,resource\_call,1,[{file,“src/webmachine\_decision\_core.erl”},{line,48}]},{webmachine\_decision\_core,decision,1,[{file,“src/webmachine\_decision\_core.erl”},{line,486}]},{webmachine\_decision\_core,handle\_request,2,[{file,“src/webmachine\_decision\_core.erl”},{line,33}]}]}}}

And a new one:

2014-06-11 17:30:47.316 [error] Supervisor pooler\_chef\_depsolver\_member\_sup  
had child chef\_depsolver\_worker started with  
{chef\_depsolver\_worker,start\_link,undefined} at \<0.19090.54\> exit with  
reason killed in context child\_terminated

For the “no connections” error, we tried to raise the db client pool to 400  
and Postgres max connections to 500 without much success. (As a side note,  
I’d really like to understand why erchef uses a db connection pool, unless  
Postgres connections are really much more expensive to establish than  
MySQL’s. Last I can remember connection pools being useful was way back in  
my Oracle PL\*SQL days.)

For /search queries are we tuning the right thing? I expect them to be  
directed to solr, not Postgres - someone clue me in? Is there a different  
tunable we should be looking at?

Just a general comment about erchef logging - the log information is almost  
inscrutable to the hapless administrator. If there any work being done to  
make the messaging clearer?

Thanks,

–Michael
