View Issue Details

IDProjectCategoryView StatusLast Update
0025762mantisbtattachmentspublic2019-05-16 05:47
ReporterTomekAPAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version2.21.0 
Target VersionFixed in Version 
Summary0025762: wrong filesize value in {bug_file} table
Description

filesize column of {bug_file} table stores size of the attachment in bytes. The field is Integer, so it stores values up to 2147483647.
When you upload bigger files, like 3GB, filesize is not correctly stored. MySQL stores max int, PostgreSQL says Integer out of range.
When using MySQL and downloading this attachment, header filesize is sent as well, so browser can download only first 2147483647 bytes of the attachment, ignoring rest, making attachemnt unreadable.

TagsNo tags attached.

Activities

dregad

dregad

2019-05-16 04:18

developer   ~0062072

Not questioning the existence of a bug, but I would challenge the need to have attachments that big...

atrol

atrol

2019-05-16 05:42

developer   ~0062074

@TomekAP how did you succeed to upload such big attachments?
To be able to store such big attachments you have to set some parameters to quite high values.
Out of curiosity: What are your settings for PHP upload_max_filesize and post_max_size ?

In case you store the attachments in database you have to increase also MySQL setting max_allowed_packet.

You might get other problems because of it (e.g. out of memory, bad performance caused by swapping), at least if there are multiple users uploading at the same time and/or your server does not have a lot of real memory.

TomekAP

TomekAP

2019-05-16 05:47

reporter   ~0062076

@atrol If server is on LAN it is quite easy. Upload_max_filesize and post_max_size are set to 3GB.
I do not store attachment in database, rather on disk. In database is only metadata(, like filename, filesize, type...)
Performance is not a problem, due to the fact, that attachment is stored on disk.

Issue History

Date Modified Username Field Change
2019-05-15 19:38 TomekAP New Issue
2019-05-16 04:18 dregad Note Added: 0062072
2019-05-16 05:42 atrol Note Added: 0062074
2019-05-16 05:47 TomekAP Note Added: 0062076