Download several large files - get CONTROL_FLUSH_ERROR

Dear all,
I want to download several large files from the application server to frontend with function module GUI_DOWNLOAD. I use a loop over the several filenames and download the files with following code:
  DATA: l_append        TYPE as4flag,
             l_count         TYPE i,
             l_max           type i    value 50000,
             ls_ziel         TYPE string,
             ls_download_txt LIKE LINE OF gt_download_txt,
             lt_download_tmp LIKE gt_download_txt.
  CONCATENATE p_front gs_sel_table-selname '.' 'txt' INTO ls_ziel.
  IF NOT gt_download_txt[] IS INITIAL.
    LOOP AT gt_download_txt INTO ls_download_txt.
      APPEND ls_download_txt TO lt_download_tmp.
      IF l_count = l_max.
CALL of FUNCTION MODUL GUI_DOWNLOAD    
        REFRESH lt_download_tmp[].
        CLEAR l_count.
        l_append = 'X'.
      ENDIF.
      l_count = l_count + 1.
    ENDLOOP.
If I only download one large file, there is no problem. But when I want to download more then one file the function module returns the error CONTROL_FLUSH_ERROR.
I can not say at which file the error occurs (2nd, 3rd, ...) I think it depends on the file size. Several smaller files are no problem. At two large files I get the error.
Does anyone has an idea?
Kind regards,
Sven

Hi,
Please check this thead perhaps it may help.
Re: CONTROL_FLUSH_ERROR with GUI_DOWNLOAD
Regards,
Ferry Lianto

Similar Messages

  • Downloading a large file

    Below code to download file in jsp application.
    What change would give the positive results for downloading a large file.
    In below code what would be the value of
    [XXXXX]
    byte[] buff = new byte[XXXXX];
    if I want to download a very large size file about 1000 KB.
    response.setContentType(getResponseContent(strFileExtension));
    response.setHeader("Content-Disposition","attachment;filename="+strFileNameToDownload);
    response.setContentLength(new Long(file.length()).intValue());
    bis = new BufferedInputStream(new FileInputStream(file));
    bos = new BufferedOutputStream(response.getOutputStream());
    byte[] buff = new byte[4 * 1024];
    int bytesRead;
    while (-1!=(bytesRead=(bis.read(buff,0,buff.length)))) {
         bos.write(buff,0,bytesRead);
    bos.flush();

    Thanks for information.
    Actually i have problem in downloading the file.
    I get below exception on server side when i download file.
    File is downloading without any problem in client browser.
    But i get the following error on Server Console
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
    Any suggestion /reasons for the problem.

  • When downloading a large file, like a movie Internet Explorer automatically provides one with the choice of where to save it - e.g. "C" drive, but Firefox doesn't. How can it be done?

    When downloading a large file, like a movie, Internet Explorer automatically opens a download window offering the choice to "Open" or "Save"the file. This provides one with the choice of where to save it - e.g. "C" drive, in the "My Documents" or "Desktop" folders but Firefox's download window doesn't. This has always frustrated me because I would rather use Firefox exclusively to access the Internet, but when it comes to saving files downloaded off the Internet, sadly, I have to revert to IE!

    If you click on Firefox from the upper-left, then Options, a new window should appear. On that window, click on the general tab. In the middle of the window, you'll see options regarding your downloads, one of which says, "Always ask me where to save files." Click on the bubble for this options, then click Ok. From then on, you should always be prompted on where you want your files saved.

  • I'm downloading a large file through Safari, but it keeps returning to the homescreen and the download stops. How do I stop this?

    I'm downloading a large file through Safari, but it keeps returning to the homescreen and the download stops. How do I stop this?

    If it's not a jpeg or PDF, you can't download it on the iPad.

  • Every time I download a large file in safari (mavericks version) at the end i get the error cannot write file. help

    evrytime i dowload a file on my macbook pro it tells me at the end that it cannot write the File. Small files download Ok but Large files do not.
    Help Please.
    mackbook pro 13 late 2012 upgraded to Mavericks restored backup from M lion with time Machine.
    Thx

    I am experiencing this as well.  I've found a workaround.  Once you know the file has stopped (the Safari download menu says it cannot write the file) then do the following:
    1. Open the Downloads folder.
    2. Open Terminal.
    3. In Terminal type "cd " and then drag the "incomplete" .download file to terminal (this just copies the path), then hit "Return" and you will change into the directory.
    4. Type "ls -l" and you should see within the .download bundle, the complete file is actually there and complete.
    5. Now, let's say the file name is "file.mp4" type "mv file.mp4 ../" and it will be moved out of the bundle one level up into the Downloads folder.  You may need to enclose the file name in quotes if it has any special characters.
    6. You can now drag the .download container to the trash, and the file should be fine.

  • OutOfMemory while uploading/downloading a large file

    Hello,
    We have recently been experiencing OutOfMemory errors in production. We find that whenver there is reasonable load and some user tries to download a 20MB zip file served from weblogic, the server throws OutOfMemoryError.
    How does Weblogic handle large file upload / download request? Is it possible to crash the weblogic server by initiating a huge file upload (in the order of 200MB)?
    Will this be kept in memory?
    like wise for downloads, what is the maximum size of the file that can be served by weblogic? Is there any memory implication? (other than the response buffer size) Will the entire file be cached in memory by weblogic when a download request gets served?
    Please help!
    Thanks!
    Dheepak.

    Hi Dheepak, Are you using a special servlet to download the zip? The default servlet always buffers only buffer_size no of bytes and then flushes it as soon as it exceeds. The default buffer size is around 8k, so you should see multiple flushes of 8k each.
    The file is not kept in memory or cached in anyway by the server itself buf I can imagine a custom servlet/filter doing that.
    For uploads, WebLogic just creates an inputStream over the underlying socket inputstream and returns it to the user. So again there is no caching of data other than the inter buffers which again arnt more than 8k.
    Hope that helps
    Nagesh

  • Access HttpContent data while downloading a large file

    Hello,
    for downloading large files methods such as ReadAsByteArrayAsync and ReadAsStreamAsync are inefficient because everything is being cached in memory and you can't access either the byte array or the stream until the await call returns (at this point the entire
    file has been downloaded).
    HttpClient client = new HttpClient();
    Task<HttpResponseMessage> responseTask = client.GetAsync(new Uri("http://video.ch9.ms/ch9/f04f/87cd2a8d-cf52-4b80-bd97-b089e6b2f04f/308MicrosoftAnalyticsPlatformSystemM02_high.mp4"));
    HttpResponseMessage response = await responseTask;
    Task<byte[]> contentTask = response.Content.ReadAsByteArrayAsync();
    byte[] content = await contentTask; // when this call returns the entire file has been downloaded and file data is finally accessible
    Is there a more efficient method to download large files and also to be able to access file data while the download is still running?
    Thx
    Steve

    and if you realllly wanna do it. i think you have to do something like this; but you will have to use a stream
    HttpClientHandler handler = new HttpClientHandler();
    HttpClient client = new HttpClient(handler);
    var response = await client.GetAsync("http://video.ch9.ms/ch9/f04f/87cd2a8d-cf52-4b80-bd97-b089e6b2f04f/308MicrosoftAnalyticsPlatformSystemM02_high.mp4", HttpCompletionOption.ResponseHeadersRead);
    var responseStream = await response.Content.ReadAsStreamAsync();
    byte[] buf = new byte[512];
    int bufSize;
    while((bufSize = (await responseStream.ReadAsync(buf, 0, buf.Length))) > 0)
    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

  • When using  Vikas' program to load large files  getting error

    Hello,
    I am using Vikas' program to load large data files: http://htmldb.oracle.com/pls/otn/f?p=38131:1
    This works fine, except when I click on the button to create table, then I get a "not found" error--
    failed to parse SQL query:
    ORA-00942: table or view does not exist
    What might cause this? I've checked grants and such and reviewed the code, but haven't figured it out...
    Thanks!

    Hello,
    I am using Vikas' program to load large data files: http://htmldb.oracle.com/pls/otn/f?p=38131:1
    This works fine, except when I click on the button to create table, then I get a "not found" error--
    failed to parse SQL query:
    ORA-00942: table or view does not exist
    What might cause this? I've checked grants and such and reviewed the code, but haven't figured it out...
    Thanks!

  • Firefox won't run Javascript while downloading a large file

    Ok, I've coded a small site featuring a fairly large flash component, and to facilitate things I've incorperated an HTML 5 element to act as the center of the page while the flash file loads. Unfortunately while this works find in Chrome and IE9, older builds of Flash were very slow and jerky during the loading process, and flash 4 doesn't actually do any scripting until the whole file loads, defeating the point.

    Maybe an external download manager can prevent Windows from going into sleep mode.
    You can use the [https://addons.mozilla.org/firefox/addon/220 FlashGot] extension to integrate an external Download Manager in Firefox.
    * http://plugindoc.mozdev.org/windows4.html
    * FlashGot: https://addons.mozilla.org/firefox/addon/220

  • Downloading XML large file

    Hi guys
    How are you doing? I would like to know how can I split a larger XML file after downloading it. What I need to do is to create an XML file... (this is done) and then, if the file is bigger than 10 MB I must to split in smaller files.
    Do you have any ideas? I'll appreciate your help.
    Best regards,
    Gabriela

    gpsoria wrote:
    > And how can i work it if it's a file for PC?
    You have to use methods GUI_DOWNLOAD/GUI_UPLOAD of class CL_GUI_FRONTEND_SERVICES, but they work on the whole file, so, that would be a little bit different than with "datasets".
    The principle would be to define an internal table with rows of 10000 bytes, and transfer the bytes of XML to it, and vice versa; you can use standard function modules and methods to do the binary transfers, it depends what exact data type of data object holds your XML.
    By the way, I didn't talk about the character encoding, do you expect a file in a fixed encoding (for example UTF-8), or one depending on the frontend? The same question arises for datasets.
    Sandra

  • I am downloading a large file and want to know what my download speed is.  How do I do this on an IMac running OSX 10.8.2

    I am downloading a 16 gig file which will take a long time.  Is there anyway to show the current download speed?  If so how?  I am running Mountain Lion on an IMac.  Thanks for your help

    Thanks!  I knew it had to be something simple but have recently come in from the cold of Windows and am still learning.

  • Large file download issue

    When we are downloading a large file 100MB + with Internet Explorer the
    workstation will at some point report that the connection was reset by the
    server and we lose the download. This is kind of random and I've only seen
    it in IE. I have and use Firefox at my desk and I have no trouble like
    this. But our campus standard is IE and I really would like to pin this down.
    My fear is the Packet filters. I went and looked at the packet filters we
    have set up and was shocked to see we had 77 filter exceptions. My last
    look only showed 45 so I need to sit down and review every filter exception
    and thin the heard. Anyway, below are the exception for http which is what
    I believe IE uses in downloading files. Right? and wanted a second option
    from you guys.
    We have NW 6.5 sp 5 BM 3.8 sp 4 ir3 and I use Craigs tuneup and proxycfg.
    the packet typ HTTP is defines as:
    Protocol TCP
    SRC Port ALL
    DEST Port 80
    ACK bit Filtering disabled
    Stateful Filtering enabled
    The filter exception are:
    #15
    Packet Type: HTTP
    Source: B57_1_EII
    All Circuits
    Any Address
    Destination: B57_2_EII
    All Circuits
    66.89.73.96/255.255.255.224
    Comment:
    #22
    Packet Type: HTTP
    Source: <All Interfaces>
    All Circuits
    Any Address
    Destination: CE1000_1
    All Circuits
    Any Address
    Comment:
    #24
    Packet Type: HTTP
    Source: B57_2_EII
    All Circuits
    Any Address
    Destination: <All Interfaces>
    All Circuits
    Any Address
    Comment: Added by BRDCFG to allow HTTP proxy.
    #67
    Packet Type: HTTP
    Source: B57_2_EII
    All Circuits
    12.22.25.0/255.255.255.240
    Destination: <All Interfaces>
    All Circuits
    192.168.3.7
    Comment: Inbound http for powerschool
    #75
    Packet Type: HTTP
    Source: B57_1_EII
    All Circuits
    192.168.3.6
    Destination: <All Interfaces>
    All Circuits
    Any Address
    Comment:
    Thanks
    David

    When I looked at the version level of Proxy.cfg I use that you wrote it was
    version 21, I did download the current version. Would the differences
    between the versions cause any of the behavior I've seen. I didn't see much
    in there that looked too different.
    Other Comments inside the threaded message:
    > On your stateful HTTP exceptions, you are:
    > #15 Allowing all HTTP to network 66.89.73.96/255.255.255.224
    To allow private LAN access to the Public IP subnet range to allow
    management of Routers etc. that are outside of this firewall.
    > #22 Allowing all HTTP to cross interface CE1000_1 - if this is the public
    > interface, you are allowing all outbound HTTP without using a proxy. If
    > this is the private interface, you are allowing all inbound HTTP through
    > any static NAT connection.
    CE1000_1 is the interface that is connected to our DMZ. We host 3 webserver
    in the DMZ for public access. One is our Groupwise Webaccess.
    > #24 Allowing all HTTP as long as it originates from the B57_2 interface.
    > If the public IP address were also specified, it would be one of the
    > default exceptions intended to allow proxy to send HTTP requests out from
    > the server to the Internet. Because source/destination IP address is
    > missing, it effectively allows traffic into the B57_2 interface as well,
    > assuming the B57_2 interface is public.
    #24 here is the default added by BM. I don't think I ever touched this one.
    This is a set of filters that were imported from our earlier BM versions
    when we built this box. Sounds like it should have the Public IP address
    listed as the source IP. Would you suggest adding that in?
    > #67 Assuming B57_2 is public, you are allowing HTTP traffic to come from
    > a specific network, into a host at 192.168.3.7, via static NAT.
    Correct. We have a turn key box with a windows application that is managed
    by the vendor via HTTP and that is their IP range and the target IP is
    192.168.3.7 and it hold a static NAT in the 66.89.73 range on the BM Server.
    > #75 Hard for me to tell what this is doing, as it appears the B57
    > interface is your public interface. It will allow any HTTP from IP
    > address 192.168.3.6 to anywhere, but only if that address is on the B57
    > side of the server, which sounds incorrect. I'm guessing that the
    > 192.168.3.x network is on the CE1000 side of the server, in which case
    > this is a useless filter exception.
    The Interface is B57_1_EII and this is the Private LAN interface. The
    intent is to allow the SPAM filter box http access to the internet without
    requiring a proxy. The box is unable to accept a proxy setting and the way
    it gets it's updates from the vendor is via HTTP.
    Thanks
    David

  • Help with download large file (~50mb) from http protocol

    I'm just using the default HttpURLConnection to download a large file from a server, I can never finish downloading before I get this exception:
    java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(SocketInputStream.java:168)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
         at sun.net.www.MeteredStream.read(MeteredStream.java:116)
         at java.io.FilterInputStream.read(FilterInputStream.java:116)
         at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2446)
         at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2441)
            ...The file is on IIS web server, its a static file, not a server script, web service, or anything special. I usually can download 10-30 mb before this exception occurs. I'm using java 1.6.0_11 on windows xp, anyone have suggestions or experience downloading large files with java?

    Thank you everyone for their suggestions. I tried wget, and it worked fine, but I tried a couple of different clients and they were failing too. I assume wget has resume capabilities, so I debugged the server and found the issue. It was a connection problem on the server end.

  • Large file incremental download

    Does iTunes store allow incremental downloads for large files? At this point I've not been able to locate a download manager to do so according to a programmed schedule, i.e. 100MB at a time according to a time schedule unattended. Thanks
    Averatec   Windows XP   AMD Turion 64 1.5G ram

    I'm afraid they don't. Downloads are one shot, which is why it's recommended you have a broadband connection. You might wanna hit up the feedback form to request a feature like this.

  • After some running time I cannot download large files via any browser.

    I am running OS X 10.9.2 on a 27inch iMac 2013 model.
    If I keep it running (without sleeping) for some time, perhaps a week, I can no longer download any large files via any browser. It will start and after a very short time go down to 0 B/s, stall there and at the end aboft with an "Unknown network error" or something similar.
    Has anyone seen similar problems?

    Open router set up using http://192.168.1.1  .....you will see username & password .....leave username blank & in password use admin...............
    Click status tab..........check firmware version .......download the latest firmware from http://linksys.com/download ..........
    Udate the firmware ....reset the router for 20-30 seconds ........ later on reconfigure the router ........

Maybe you are looking for

  • Error in Downloading iTunes 9 on G5

    When downloading I get a message at the bottom of the Safari window that states an error occurred and to go to Window>Activity. iTunes continues to download. When I check Window>Activity, it states, "Frame Rate Interrupted." When iTunes completes the

  • After updating when i close itunes it wont open back up until i log off and log back on or reboot

    After updating to latest software when i close itunes it wont open back up until i log off and log back on or reboot. Now I have removed itunes and reinstalled it but same problem

  • Draw my signature grayed out in Acrobat XI

    I need clients to be able to "sign" the form with their finger or stylus, however, draw my signature is grayed out. The only option is "use a certificate" HELP!

  • Using Edge animation with Muse

    Hi, How can have my Muse website load with an Edge animation prior to Muse site's home page?

  • Error playing rented movie

    Having finally decided to try renting a movie with iTunes, I'm afraid the experience is not a good one. When attempting to play the movie, I get the following error message: "We could not complete your iTunes store request. An unknown error occurred