Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backlog is not initialized #6

Closed
gootik opened this issue Apr 28, 2017 · 4 comments
Closed

Backlog is not initialized #6

gootik opened this issue Apr 28, 2017 · 4 comments

Comments

@gootik
Copy link

gootik commented Apr 28, 2017

I can't figure out why this is happening, but there are no crash logs or any errors. This works locally but not on a production machine. Here is a log of what I run:

(bidbox@127.0.0.1)4> Url2 = buoy_utils:parse_url(<<"http://localhost:7949/recommend">>).
{buoy_url,<<"localhost:7949">>,<<"localhost">>,
          <<"/recommend">>,7949,http}
(bidbox@127.0.0.1)5> buoy_pool:start(Url2, [{pool_size, 16}]).
ok
(bidbox@127.0.0.1)6> buoy:post(Url2, [{<<"content-type">>, <<"application/json">>}], <<"{}">>).
** exception error: bad argument
     in function  ets:update_counter/3
        called as ets:update_counter(shackle_backlog,http_localhost_7949_13,
                                     [{2,0},{2,1,1024,1024}])
     in call from shackle_backlog:check/2 (/opt/bidbox/_build/default/lib/shackle/src/shackle_backlog.erl, line 73)
     in call from shackle_pool:server/1 (/opt/bidbox/_build/default/lib/shackle/src/shackle_pool.erl, line 96)
     in call from shackle:call/3 (/opt/bidbox/_build/default/lib/shackle/src/shackle.erl, line 52)

Some more info:

(bidbox@127.0.0.1)9> ets:tab2list(shackle_backlog).
[]
(bidbox@127.0.0.1)10> ets:tab2list(shackle_pool).
[{http_localhost_7949,{pool_options,1024,buoy_client,16,
                                    random}}]
(bidbox@127.0.0.1)11> ets:tab2list(buoy_pool).
[{{http,<<"localhost">>,7949},http_localhost_7949}]

and some system info:

(bidbox@127.0.0.1)13> erlang:system_info(system_version).
"Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:10] [hipe] [kernel-poll:true]\n"
@gootik
Copy link
Author

gootik commented Apr 28, 2017

I think i have figured out the issue. relx is not including metal because of an issue in the .app.src file. I will verify and open PR in there.

@lpgauth
Copy link
Owner

lpgauth commented Apr 28, 2017

Ah, good catch. I'll push a fix shortly.

@lpgauth
Copy link
Owner

lpgauth commented Apr 28, 2017

@lpgauth lpgauth closed this as completed Apr 28, 2017
@gootik
Copy link
Author

gootik commented Apr 28, 2017

Awesome, thanks. But I think there is one more thing to be fixed now that metal is being included.

===> Errors generating release
          metal: Missing parameter in .app file: mod

I think the mod field is expected to be a tuple not a list in https://github.com/lpgauth/metal/blob/master/src/metal.app.src#L8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants