Ticket #20 (closed bug: fixed)

Opened 7 months ago

Last modified 6 months ago

Mongrel doesn't erase temporary files during it's operation on windows

Reported by: contact Assigned to: evanweaver
Priority: minor Milestone: 1.2
Component: Mongrel Keywords:
Cc:

Description

I've noted one issue on Mongrel working under windows. It doesn't erase temporary files during it's operation. When there are a lot of uploads in rails application, it comes to "too many files open" state and doesn't work at all.

I looked at the sources of mongrel and detected that Tempfile's are erased using "delete" method, like this in mongrel.rb:

request.body.delete if request and request.body.class == Tempfile

This is incorrect under windows, as I think, because "delete" can't unlink the tempfile - because tempfile is still open. After changing all "delete" to "close!", everything becomes right:

request.body.close! if request and request.body.class == Tempfile

May you fix the mongrel trunk, changing all tempfile's "delete" to "close!" ?

Change History

03/23/08 22:50:28 changed by evanweaver

  • status changed from new to closed.
  • resolution set to fixed.