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

Fetching all User objects throws undefined method error from cache_read_compressed #37

Open
jvendetti opened this issue Sep 6, 2024 · 1 comment
Labels

Comments

@jvendetti
Copy link
Member

jvendetti commented Sep 6, 2024

The production log files for the BioPortal RoR application contain stack traces like this one for any action that results in a fetch of all the user objects:

[ce527356-3fff-4e70-816b-3b7cb6397efd] NoMethodError (Problem retrieving:
https://data.bioontology.org/users?include=all

Error: undefined method `bytesize' for nil:NilClass
/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/gems/lz4-ruby-0.3.3/lib/lz4-ruby.rb:21:in `decompress'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/gems/lz4-ruby-0.3.3/lib/lz4-ruby.rb:36:in `uncompress'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-object-cache.rb:190:in `cache_read_compressed'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-object-cache.rb:155:in `cache_read'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-object-cache.rb:73:in `block in call'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/gems/faraday-2.7.12/lib/faraday/response.rb:42:in `on_complete'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-object-cache.rb:63:in `call'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-last-updated.rb:16:in `call'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-slices.rb:16:in `call'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/middleware/faraday-user-apikey.rb:16:in `call'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/gems/faraday-2.7.12/lib/faraday/rack_builder.rb:153:in `build_response'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/gems/faraday-2.7.12/lib/faraday/connection.rb:444:in `run_request'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/gems/faraday-2.7.12/lib/faraday/connection.rb:200:in `get'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/http.rb:68:in `get'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/collection.rb:43:in `entry_point'
	/srv/ontoportal/bioportal_web_ui/shared/bundle/ruby/3.0.0/bundler/gems/ontologies_api_ruby_client-f589b13dfbbc/lib/ontologies_api_client/collection.rb:56:in `all'
	/srv/ontoportal/bioportal_web_ui/releases/20240905184034/app/controllers/ontologies_controller.rb:194:in `edit'
@jvendetti jvendetti added the bug label Sep 6, 2024
@jvendetti
Copy link
Member Author

On a somewhat related note, it appears that the Ruby library we use for LZ4 compression was abandoned in 2014. It's unclear what to use as a potential replacement. Maybe this one: https://github.com/Shopify/lz4-flex-rb?

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

No branches or pull requests

1 participant