You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2013/04/12 23:52:15 UTC
[jira] [Updated] (CB-2787) PhoneGap FileTransfer.Download more than
300 files
[ https://issues.apache.org/jira/browse/CB-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve updated CB-2787:
------------------------------
Assignee: Ian Clelland (was: Andrew Grieve)
> PhoneGap FileTransfer.Download more than 300 files
> --------------------------------------------------
>
> Key: CB-2787
> URL: https://issues.apache.org/jira/browse/CB-2787
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.5.0
> Reporter: Cho
> Assignee: Ian Clelland
>
> I had tried to download more than 300 files and then it hit error after that. Seems like some IO Connection was not properly closed. I wrote a small code to test it out.
> Any idea? How to file a report or get a source of phonegap to check the real cause?
> {code}
> var counter = 500;
> function DownloadFile() {
> if (counter == 0) {
> DownloadComplete();
> return;
> }
> var ft = new FileTransfer();
> var downloadUrl = "<source>";
> var dlPath = "<target>"
> ft.download(downloadUrl, dlPath, function(entry) {
> counter--;
> UpdateProgress();
> DownloadFile();
> }, function(error) {
> DownloadFailed();
> }, true);
> }
> {code}
> note: <target> and <source> is alright because it was it failed when the counter goes until 300+.
> {code}
> 03-14 08:35:09.706: E/FileTransfer(24867): {"target":"<target>","source":"<source>","http_status":200,"code":1}
> 03-14 08:35:09.706: E/FileTransfer(24867): java.io.FileNotFoundException: <source>: open failed: EMFILE (Too many open files)
> 03-14 08:35:09.706: E/FileTransfer(24867): at libcore.io.IoBridge.open(IoBridge.java:416)
> 03-14 08:35:09.706: E/FileTransfer(24867): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
> 03-14 08:35:09.706: E/FileTransfer(24867): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
> 03-14 08:35:09.706: E/FileTransfer(24867): at org.apache.cordova.FileTransfer$4.run(FileTransfer.java:685)
> 03-14 08:35:09.706: E/FileTransfer(24867): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
> 03-14 08:35:09.706: E/FileTransfer(24867): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
> 03-14 08:35:09.706: E/FileTransfer(24867): at java.lang.Thread.run(Thread.java:856)
> 03-14 08:35:09.706: E/FileTransfer(24867): Caused by: libcore.io.ErrnoException: open failed: EMFILE (Too many open files)
> 03-14 08:35:09.706: E/FileTransfer(24867): at libcore.io.Posix.open(Native Method)
> 03-14 08:35:09.706: E/FileTransfer(24867): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
> 03-14 08:35:09.706: E/FileTransfer(24867): at libcore.io.IoBridge.open(IoBridge.java:400)
> 03-14 08:35:09.706: E/FileTransfer(24867): ... 6 more
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira