medusa-project / book-tracker

Medusa Book Tracker
0 stars 0 forks source link

Internet Archive check failes with undefined method `content' for nil:NilClass #45

Closed henryborchers closed 10 months ago

henryborchers commented 11 months ago

When running Internet Archive check in BookTracker, I get a message that the task failed.

The message I can see is... Internet Archive check failed: undefined method `content' for nil:NilClass

adolski commented 11 months ago

@gaurijo Could you look into this?

gaurijo commented 11 months ago

@adolski The live Book Tracker site is not up to date with whatever has been merged to our develop branch. Our production branch is not up to date with the demo branch, and demo branch is also not up to date with the develop branch.

I couldn't reproduce the error locally, so I think it's failing due to the above.

Local server/development:

Image

Production:

Image

Was this service check triggered automatically after running an import? With the changes we've made, there shouldn't be a way to run the Hathi or Internet Archive service checks manually, right?

gaurijo commented 10 months ago

@adolski Going back to this issue, I think the error will be resolved by

  1. merging develop into demo
  2. merging demo into production
  3. and then deploying to production

If that sounds okay to you, I can go ahead with that.

adolski commented 10 months ago

Absolutely, go right ahead.

henryborchers commented 10 months ago

When I ran it this month, I didn't run into the same problem.

gaurijo commented 10 months ago

@adolski Unfortunately I'm running into the same disk space error when I try to deploy. Last time this happened I had increased the ephemeral storage and that fixed it, so I'm not sure why it's happening again.

Image

adolski commented 10 months ago

By chance, do you have a large log/development.log file?

gaurijo commented 10 months ago

Yes, almost 60 GB!

Image

adolski commented 10 months ago

Bingo! That also explains the need for more ephemeral storage for the Fargate task and why your images are so big.

I've just pushed a commit to add /log to the .dockerignore file so that it won't include log files in the image anymore. That ought to fix this.

And I've updated config/environments/development.rb to modify the logger to log only to stdout, so it won't create a log file anymore.

gaurijo commented 10 months ago

Excellent! I pulled your latest commits and merged everything into demo/prod.

Just ran another deploy to prod and we're in the green. I'll go ahead and close this issue since it sounds like @henryborchers is no longer running into errors.