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

Tzdata polling for update #91

Closed
dowusu opened this issue Nov 27, 2019 · 9 comments
Closed

Tzdata polling for update #91

dowusu opened this issue Nov 27, 2019 · 9 comments

Comments

@dowusu
Copy link

dowusu commented Nov 27, 2019

I observe the below error in my production logs.

[error] GenServer :tzdata_release_updater terminating
** (ArgumentError) argument error
(stdlib) :ets.lookup_element(:hackney_config, :mod_metrics, 2)
/Users/kodepet/Documents/Work/topup/deps/hackney/src/hackney_metrics.erl:26: :hackney_metrics.get_engine/0
/Users/kodepet/Documents/Work/topup/deps/hackney/src/hackney_connect.erl:78: :hackney_connect.create_connection/5
/Users/kodepet/Documents/Work/topup/deps/hackney/src/hackney_connect.erl:47: :hackney_connect.connect/5
/Users/kodepet/Documents/Work/topup/deps/hackney/src/hackney.erl:333: :hackney.request/5
(tzdata) lib/tzdata/http_client/hackney.ex:17: Tzdata.HTTPClient.Hackney.head/3
(tzdata) lib/tzdata/data_loader.ex:46: Tzdata.DataLoader.last_modified_of_latest_available/1
(tzdata) lib/tzdata/release_updater.ex:81: Tzdata.ReleaseUpdater.loaded_tzdata_matches_remote_last_modified?/0
(tzdata) lib/tzdata/release_updater.ex:42: Tzdata.ReleaseUpdater.poll_for_update/0
(tzdata) lib/tzdata/release_updater.ex:19: Tzdata.ReleaseUpdater.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: :check_if_time_to_update
State: []

@ericmj
Copy link

ericmj commented Dec 4, 2019

@lau The bug seems to have been introduce in a faulty merge commit. Hackney should be an optional dependency: ac50d19#diff-6023be6004fce4718dad3dafb576d258R34

brianmay added a commit to brianmay/robotica-elixir that referenced this issue Dec 5, 2019
@dowusu
Copy link
Author

dowusu commented Dec 6, 2019

I disabled automatic update - I'm fine now, Kudos for the awesome work.

@lau
Copy link
Owner

lau commented Dec 11, 2019

@dowusu Thank you. Which version of Elixir did this happen on?

@ericmj Hackney has never been an optional dependency in any releases. Early versions did not have it as a dependency at all though. Even if it were optional, if someone used it and has automatic updating turned on, wouldn't the same thing happen?

It looks to me like a problem with Hackney assuming an ETS table is available - but it is not. Maybe Hackney is not running even though it should be.

I am working on a new version of Tzdata that will not depend on hackney.

@ericmj
Copy link

ericmj commented Dec 11, 2019

If it's not optional you should not have a custom applications function: https://github.com/lau/tzdata/blob/master/mix.exs#L29-L30.

@lau
Copy link
Owner

lau commented Dec 11, 2019

@ericmj Thank you Eric!

@asummers
Copy link
Contributor

That's fixed in #92 I believe!

@dowusu
Copy link
Author

dowusu commented Dec 13, 2019

@dowusu Thank you. Which version of Elixir did this happen on?

@ericmj Hackney has never been an optional dependency in any releases. Early versions did not have it as a dependency at all though. Even if it were optional, if someone used it and has automatic updating turned on, wouldn't the same thing happen?

It looks to me like a problem with Hackney assuming an ETS table is available - but it is not. Maybe Hackney is not running even though it should be.

I am working on a new version of Tzdata that will not depend on hackney.

@dowusu dowusu closed this as completed Dec 13, 2019
@dowusu dowusu reopened this Dec 13, 2019
@dowusu
Copy link
Author

dowusu commented Dec 13, 2019

Sorry for the late response, I'm using elixir 1.9.2
I fixed the issue by disabling automatic update.

@lau
Copy link
Owner

lau commented Dec 19, 2019

There is a new release 1.0.3 which should fix this.

@lau lau closed this as completed Dec 19, 2019
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

4 participants