Project

General

Profile

Actions

Defect #3116

closed

Uploading medium size file fails

Added by Thomas Jahns over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
2009-04-03
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

our software requires ca. 1GiB initialization files, which I put in a tar archive I wanted to upload into the files section of our redmine setup1.

Unfortunately the following happens with my setup of redmine:

1. the file upload completes on the http level (at least the transferred amount of data I see in iftop matches the files size)
2. the system goes into a state of high load and starts swapping, this takes a few minutes
3. sometimes I get an error message (see attached file), sometimes the browser just times out on waitng for www server, there is no error message in the log
4. memory consumption stays high, unless I manually kill the ruby process and restart

[1] The setup is a debian lenny 5.0 i386 system on a P4 2.4GHz with 512MiB of RAM, following the installation of redmine in a users home directory recipe. redmine is started from a daemontools svscan.


Files

redmine-error-message.html (652 Bytes) redmine-error-message.html Thomas Jahns, 2009-04-03 15:29
production.log (5.43 KB) production.log Thomas Jahns, 2009-04-09 09:12

Related issues

Related to Redmine - Defect #3145: Upload of bigger files fails iff version is definedClosed2009-04-09

Actions
Actions #1

Updated by Thomas Jahns over 15 years ago

Version is 0.8.2

Actions #2

Updated by Eric Davis over 15 years ago

That is the generic "Something bad happened" error. Can you attach your log files that include the actual error? They are stored in log/production.log

Actions #3

Updated by Thomas Jahns over 15 years ago

Eric Davis wrote:

Can you attach your log files that include the actual error? They are stored in log/production.log

good hint, another file to put into log rotation.

From the log I see that ruby got an out of memory error. From what I read on some other boards, I can see that redmine does some in-memory processing of uploaded files. Is that a sensible approach? Why doesn't the file simply get dumped into a staging directory inside the redmine directory and moved to the files directory when the upload finished successfully?

I hope the backtrace is of some use.

Actions #4

Updated by Jean-Philippe Lang over 15 years ago

  • Resolution set to Fixed

Memory consumption on file upload is fixed in r2670.
Can you confirm please?

Actions #5

Updated by Thomas Jahns over 15 years ago

Jean-Philippe Lang wrote:

Memory consumption on file upload is fixed in r2670.
Can you confirm please?

Only partially. Yes, memory consumption did go down, but was still high and upload again failed on another file. I then tried to search for similar reports and found <http://www.jedi.be/blog/2009/04/10/rails-and-large-large-file-uploads-looking-at-the-alternatives/&gt;. From there I decided to give mongrel a go and stopped webrick and used

mongrel_rails start -e production

to start the redmine server. That did significantly reduce memory footprint.

So I guess your fix does improve memory consumption and decrease the time for md5 computation but running mongrel is a worthwhile recommendation since redmine itself is innocent of most of the memory usage in file uploads.

Greetings, Thomas

Actions #6

Updated by Thomas Jahns over 15 years ago

  • Status changed from New to Resolved

That should have been:

http://www.jedi.be/blog/2009/04/10/rails-and-large-large-file-uploads-looking-at-the-alternatives/

So perhaps parsing <URL> is another issue. ;-)

Greetings, Thomas

Actions #7

Updated by Jean-Philippe Lang over 15 years ago

  • Category set to Attachments
  • Status changed from Resolved to Closed

I use mongrel for development. I didn't even try with webrick but anyone who runs rails applications should know that webrick is not suitable for production purpose :-)

The fix is merged in 0.8-stable branch in r2681.
Thanks for the feedback.

Actions

Also available in: Atom PDF