Downloading big files (2gb+)

Need help? Post your questions here.

Moderator: moderators

Downloading big files (2gb+)

Postby ubuntu_user » Thu Jan 22, 2009 9:56 pm

I have a problem when downloading larger files (4.4gb). I have tested subsonic with some video streaming, but it seems that downloading is a problem.
It starts downloading, but the filesize is set only to about 381mb for a 4.4gb file and if I stream the movie it stops about 10 minutes in. I seems that the problem is the filesize is an 32bit variable and should be 64 bit, but im not that much into programming, so it could be something else.

The system is a ubuntu system and using apache_tomcat as host application.

When i try to download it with the zip function i get this error which only supports the problem.


Exception java.lang.IllegalArgumentException
Message invalid entry size
Java version Sun Microsystems Inc. 1.6.0_07
Operating system Linux 2.6.24-21-generic
Server Apache Tomcat/6.0.18
Memory Used 63 of 97 MB


Java.lang.IllegalArgumentException: invalid entry size at java.util.zip.ZipEntry.setSize(ZipEntry.java:135) at net.sourceforge.subsonic.controller.DownloadController.zip(DownloadController.java:314) at net.sourceforge.subsonic.controller.DownloadController.downloadPlaylist(DownloadController.java:227) at net.sourceforge.subsonic.controller.DownloadController.handleRequest(DownloadController.java:115)

And so on.

Thanks in advance
ubuntu_user
 
Posts: 7
Joined: Thu Jan 22, 2009 9:42 pm

Postby sindre_mehus » Fri Jan 23, 2009 8:27 am

It turns out that this is a bug/feature in Java.

The method javax.servlet.ServletResponse.setContentLength(int) has a 2 GB maximum:
http://bugs.sun.com/bugdatabase/view_bu ... id=4187336

There is fortunately a work-around that I will use:
http://blogger.ziesemer.com/2008/03/sun ... k-2gb.html

Regarding the zip error, it turns out that it has a limit of 4GB, according to wikipedia. There is a "ZIP64" format extension to get around this, but that is apparently not included in Sun's implementation.

Anyway, I'll implement the setContentLength work-around in 3.6, and hopefully that will solve your issue.

Thanks for reporting it!
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway


Return to Help

Who is online

Users browsing this forum: No registered users and 10 guests