NancyFx / Nancy

Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono
http://nancyfx.org
MIT License
7.15k stars 1.46k forks source link

Temp files not cleaned up #2767

Open apitzele opened 7 years ago

apitzele commented 7 years ago

Description

I have a microservice implemented with Nancy and OWIN. The service's responsibility is to accept files and write them to blob storage. When the request is over a certain size, Nancy writes the file to disk in a temp directory. Occasionally these .tmp files fail to get cleaned up.

@grumpydev mentioned on the stack link below that this issue hasn't been seen in awhile but we are on clinteastwood so it looks like the issue hasn't been completly resolved.

https://stackoverflow.com/questions/44847409/nancy-owin-service-fabric-microservice-writes-requests-to-temp-file/44847845#44847845

Steps to Reproduce

I have not been able to reproduce this issue on demand.

System Configuration

We are seeing this problem in our Service Fabric clusters which host Nancy via OWIN

xt0rted commented 7 years ago

These are the related issues around the temp file cleanup that was added to 2.0 #2159, #2430, and #2512.

apitzele commented 7 years ago

Those 3 PRs would have been merged into either clinteastwood, barneyrubble or the alpha releases. I can confirm we've been using clinteastwood since March and are still seeing the behavior.

danbarua commented 7 years ago

I've since moved to a new job so I'm not suffering from the temp file issue any more myself, and I didn't have any luck resolving the issue. We were on OWIN so we could swap RequestStream for RecyclableMemoryStream.

thecodejunkie commented 7 years ago

Any additional info on how we could (reliably?) reproduce this?