uoregon-libraries / rais-image-server

RAIS: A IIIF-compliant, 100% open source image server for blazing-fast deep zooming
Creative Commons Zero v1.0 Universal
78 stars 6 forks source link

Server crashes on exit #39

Closed jechols closed 3 years ago

jechols commented 3 years ago

This has been going on for a bit, and is probably related to the cleanup code. It doesn't really cause problems since it's only crashing after you request RAIS to exit... but it still is really annoying.

jechols commented 3 years ago

This is actually a problem after all, and potentially a big one. Plugins don't get their Teardown methods run when this crash occurs. In some cases it won't matter because the user has no plugins; and in some cases it's a concern, but only a minor one, such as losing a few JSON trace results.

But it could be devastating in some situations, such as the old S3 plugin which relied on Teardown to clean up the filesystem, or if somebody uses the JSON tracer plugin with a long time between writes, where a server crash could cost a lot of information.

jechols commented 3 years ago

It's worth noting that this seems to be new behavior, so it's probably a change to Go - you're never supposed to do what I did (passing nil in as a context.Context), but it only recently started crashing. So this probably doesn't affect anybody. Yet.