Wpg_docload fails with "large" files

Hi people,
I have an application that allows the user to query and download files stored in an external application server that exposes its functionality via webservices. There's a lot of overhead involved:
1. The user queries the file from the application and gets a link that allows her to download the file. She clicks on it.
2. Oracle submits a request to the webservice and gets a XML response back. One of the elements of the XML response is an embedded XML document itself, and one of its elements is the file, encoded in base64.
3. The embedded XML document is extracted from the response, and the contents of the file are stored into a CLOB.
4. The CLOB is converted into a BLOB.
5. The BLOB is pushed to the client.
Problem is, it only works with "small" files, less than 50 KB. With "large" files (more than 50 KB), the user clicks on the download link and about one second later, gets a
The requested URL /apex/SCHEMA.GET_FILE was not found on this serverWhen I run the webservice outside Oracle, it works fine. I suppose it has to do with PGA/SGA tuning.
It looks a lot like the problem described at this Ask Tom question.
Here's my slightly modified code (XMLRPC_API is based on Jason Straub's excellent [Flexible Web Service API|http://jastraub.blogspot.com/2008/06/flexible-web-service-api.html]):
CREATE OR REPLACE PROCEDURE get_file ( p_file_id IN NUMBER )
IS
    l_url                  VARCHAR2( 255 );
    l_envelope             CLOB;
    l_xml                  XMLTYPE;
    l_xml_cooked           XMLTYPE;
    l_val                  CLOB;
    l_length               NUMBER;
    l_filename             VARCHAR2( 2000 );
    l_filename_with_path   VARCHAR2( 2000 );
    l_file_blob            BLOB;
BEGIN
    SELECT FILENAME, FILENAME_WITH_PATH
      INTO l_filename, l_filename_with_path
      FROM MY_FILES
     WHERE FILE_ID = p_file_id;
    l_envelope := q'!<?xml version="1.0"?>!';
    l_envelope := l_envelope || '<methodCall>';
    l_envelope := l_envelope || '<methodName>getfile</methodName>';
    l_envelope := l_envelope || '<params>';
    l_envelope := l_envelope || '<param>';
    l_envelope := l_envelope || '<value><string>' || l_filename_with_path || '</string></value>';
    l_envelope := l_envelope || '</param>';
    l_envelope := l_envelope || '</params>';
    l_envelope := l_envelope || '</methodCall>';
    l_url := 'http://127.0.0.1/ws/xmlrpc_server.php';
    -- Download XML response from webservice. The file content is in an embedded XML document encoded in base64
    l_xml := XMLRPC_API.make_request( p_url      => l_url,
                                      p_envelope => l_envelope );
    -- Extract the embedded XML document from the XML response into a CLOB
    l_val := DBMS_XMLGEN.convert( l_xml.extract('/methodResponse/params/param/value/string/text()').getclobval(), 1 );
    -- Make a XML document out of the extracted CLOB
    l_xml := xmltype.createxml( l_val );
    -- Get the actual content of the file from the XML
    l_val := DBMS_XMLGEN.convert( l_xml.extract('/downloadResult/contents/text()').getclobval(), 1 );
    -- Convert from CLOB to BLOB
    l_file_blob := XMLRPC_API.clobbase642blob( l_val );
    -- Figure out how big the file is
    l_length    := DBMS_LOB.getlength( l_file_blob );
    -- Push the file to the client
    owa_util.mime_header( 'application/octet', FALSE );
    htp.p( 'Content-length: ' || l_length );
    htp.p( 'Content-Disposition: attachment;filename="' || l_filename || '"' );
    owa_util.http_header_close;
    wpg_docload.download_file( l_file_blob );
END get_file;
/I'm running XE, PGA is 200 MB, SGA is 800 MB. Any ideas?
Regards,
Georger

Script: http://www.indesignsecrets.com/downloads/MultiPageImporter2.5JJB.jsx.zip
It works great for files upto ~400 pages, when have more pages than that, is when I get the crash at around page 332 .
Thanks

Similar Messages

  • Photoshop CS6 keeps freezing when I work with large files

    I've had problems with Photoshop CS6 freezing on me and giving me RAM and Scratch Disk alerts/warnings ever since I upgraded to Windows 8.  This usually only happens when I work with large files, however once I work with a large file, I can't seem to work with any file at all that day.  Today however I have received my first error in which Photoshop says that it has stopped working.  I thought that if I post this event info about the error, it might be of some help to someone to try to help me.  The log info is as follows:
    General info
    Faulting application name: Photoshop.exe, version: 13.1.2.0, time stamp: 0x50e86403
    Faulting module name: KERNELBASE.dll, version: 6.2.9200.16451, time stamp: 0x50988950
    Exception code: 0xe06d7363
    Fault offset: 0x00014b32
    Faulting process id: 0x1834
    Faulting application start time: 0x01ce6664ee6acc59
    Faulting application path: C:\Program Files (x86)\Adobe\Adobe Photoshop CS6\Photoshop.exe
    Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
    Report Id: 2e5de768-d259-11e2-be86-742f68828cd0
    Faulting package full name:
    Faulting package-relative application ID:
    I really hope to hear from someone soon, my job requires me to work with Photoshop every day and I run into errors and bugs almost constantly and all of the help I've received so far from people in my office doesn't seem to make much difference at all.  I'll be checking in regularly, so if you need any further details or need me to elaborate on anything, I should be able to get back to you fairly quickly.
    Thank you.

    Here you go Conroy.  These are probably a mess after various attempts at getting help.

  • Ifconfig pcelx0 plumb fails with Bad file number error

    Hi,
    I installed solaris 8 (x86) on a Toshiba Tecra 8000.
    The Tecra uses Neomagic NM2200 chipset for it's display.
    Even though it is not supported by the Sun Drivers, getting xfree86 for sun fixed the display problem for me.
    Now according to the various sources that guided me in this task seemed to point at a few things that I had to do in order to make the Tecra work okay with Solaris 8 :
    1)Change the PCMCIA mode in the BIOS from automatic to PCIC mode
    2)Make sure that there were no IRQ conflicts on the system.
    3)Install the OS.
    Once the OS was installed, I ran prtconf -D and saw that the network instance #0 pcelx0 was showing up under pcic.
    I did not have to install the xig init-pcic patch.
    But it did not create an entry in /devices or /dev (as a link) with the error
    "pcelx0 requested IRQ failed 6".
    Also, I suppose that is the reason why when pcelx0 is plumbed, it comes out with the error message:
    ifconfig pcelx0 plumb : "bad file number"
    Any help will be greatly appreciated.
    Thanks,
    Dwai.

    Thanks Alex,
    I found out -
    ifconfig adapter plumb will fail with Bad File number error when the device file that is being referred to is missing.
    I checked and found that the pcelx link is not being made in the /dev directory and the file not created in /devices.
    I also found that when /reconfigure is run, it tries to create the device for pcelx but fails with this eror message:
    pcelx : RequestIRQ fail 6
    I am assuming that there is some IRQ conflict with some other device.
    Thanks,
    Dwai.

  • ISE upgrade failing with "% Manifest file not found in the bundle"

    Hello
    I am trying to upgrade a brand new ISE 3395 from 1.0.3.337 to 1.0.4 (latest).  It keeps failing with
    % Manifest file not found in the bundle
    Here is the output:
    company-ise-01/admin# application upgrade ise-appbundle-1.0.4.573.i386.tar.gpg ftp
    Save the current ADE-OS running configuration? (yes/no) [yes] ?
    Generating configuration...
    Saved the ADE-OS running configuration to startup successfully
    Initiating Application Upgrade...
    % Manifest file not found in the bundle
    fusd-ise-01/admin# sh application version ise
    Cisco Identity Services Engine
    Version      : 1.0.3.377
    Build Date   : Fri May  6 19:30:37 2011
    Install Date : Wed Oct 12 22:18:26 2011
    I can't find anything about this for ISE, although there are a lot of topics for the same error for ACS.  Thanks in advance.
    Saro

    Same problem with 1.1.2 and 1.1.1 patch 5:
    ISEcdemo/admin# sh ver
    Cisco Application Deployment Engine OS Release: 2.0
    ADE-OS Build Version: 2.0.4.018
    ADE-OS System Architecture: i386
    Copyright (c) 2005-2011 by Cisco Systems, Inc.
    All rights reserved.
    Hostname: ISEcdemo
    Version information of installed applications
    Cisco Identity Services Engine
    Version      : 1.1.1.268
    Build Date   : Mon Jun 25 05:49:23 2012
    Install Date : Wed Sep 12 09:12:53 2012
    Cisco Identity Services Engine Patch
    Version      : 1
    Install Date : Wed Sep 12 10:01:22 2012
    Cisco Identity Services Engine Patch
    Version      : 2
    Install Date : Wed Sep 12 13:10:36 2012
    Cisco Identity Services Engine Patch
    Version      : 3
    Install Date : Tue Nov 27 12:33:19 2012
    Cisco Identity Services Engine Patch
    Version      : 4
    Install Date : Tue Nov 27 12:52:50 2012
    ISEcdemo/admin# patch install ise-patchbundle-1.1.1.268-5-68046.i386.tar.gz my2
    Save the current ADE-OS running configuration? (yes/no) [yes] ? yes
    Generating configuration...
    Saved the ADE-OS running configuration to startup successfully
    Initiating Application Patch installation...
    % Manifest file not found in the bundle
    ISEcdemo/admin#
    ISEcdemo/admin# application upgrade ise-appbundle-1.1.2.145.i386.tar.gz my2
    Save the current ADE-OS running configuration? (yes/no) [yes] ? yes
    Generating configuration...
    Saved the ADE-OS running configuration to startup successfully
    Initiating Application Upgrade...
    % Manifest file not found in the bundle
    Can someone verify the downloaded file details? They are different from cisco.com values:
    -bash-4.1$ /usr/bin/md5sum.exe /cygdrive/c/munka-unenc/tftp/ise-appbundle-1.1.2.145.i386.tar.gz
    2aa9b75ef5d7c1662a1a51844f178b77 */cygdrive/c/munka-unenc/tftp/ise-appbundle-1.1.2.145.i386.tar.gz
    -bash-4.1$ /usr/bin/ls -lAp /cygdrive/c/munka-unenc/tftp/ise-appbundle-1.1.2.145.i386.tar.gz
    -rwx------+ 1 Administrators Domain Users 1583851520 Nov 29 00:14 /cygdrive/c/munka-unenc/tftp/ise-appbundle-1.1.2.145.i386.tar.gz

  • Dealing with large files, again

    Ok, so I've looked into using BufferedReaders and can't get my head round them; or more specifically, I can't work out how to apply them to my code.
    I have inserted a section of my code below, and want to change it so that I can read in large files (of over 5 million lines of text). I am reading the data into different arrays and then processing them. Obvioulsy, when reading in such large files, my arrays are filling up and failing.
    Can anyone suggest how to read the file into a buffer, deal with a set amount of data, process it, empty the arrays, then read in the next lot?
    Any ideas?
    void readV2(){
         String line;
         int i=0,lineNo=0;
            try {
              //Create input stream
                FileReader fr = new FileReader(inputFile);
                 BufferedReader buff = new BufferedReader(fr);
                while((line = buff.readLine()) != null) {
              if(line.substring(0,2).equals("V2")){
                     lineNo = lineNo+1;
              IL[i] = Integer.parseInt(line.substring(8,15).trim());
                    //Other processing here
                     NoOfPairs = NoOfPairs+1;
                     }//end if
                     else{
                      break;
            }//end while
            buff.close();
            fr.close();
            }//end try
            catch  (IOException e) {
            log.append("IOException error in readESSOV2XY" + e + newline);
            proceed=false;
            }//end catch IOException
            catch (ArrayIndexOutOfBoundsException e) {
                   arrayIndexOutOfBoundsError(lineNo);
         }//end catch ArrayIndexOutOfBoundsException
         catch (StringIndexOutOfBoundsException e) {
              stringIndexOutOfBoundsError(e.getMessage(),lineNo);
    }//end V2Many thanks for any help!
    Tim

    Yeah, ok, so that seems simple enough.
    But once I have read part of the file into my program,
    I need to call another method to deal with the data I
    have read in and write it out to an output file.
    How do I get my file reader to "remember" where I am
    up to in the file I'm reading?
    An obvious way, but possibly not too good technically,
    would be to set a counter and when I go back to the
    fiel reader, skip that number of lines in the inpuit
    file.
    This just doesn't seem too efficient, which is
    critical when it comes to dealing with such large
    files (i.e. several million lines long)I think you might need to change the way you are thinking about streams. The objective of a stream is to read and process data at the same time.
    I would recommend that you re-think your algorithm : instead of reading the whole file, then doing your processing - think about how you could read a line and process a line, then read the next line, etc...
    By working on just the pieces of data that you have just read, you can process huge files with almost no memory requirements.
    As a rule of thumb, if you ever find yourself creating huge arrays to hold data from a file, chances are pretty good that there is a better way. Sometimes you need to buffer things, but very rarely do you need to buffer such huge pieces.
    - K

  • Mounting CIFS on MAC with large file support

    Dear All,
    We are having issues copying large files ( > 3.5 GB) from MAC to a CIFS Share (smb mounted on MAC) whereby the copy fails if files are larger than 3.5 GB in size and hence I was wondering if there is any special way to mount CIFS Shares (special option in the mount_smbfs command perhaps ) to support large file transfer?
    Currently we mount the share using the command below
    mount_smbfs //user@server/<share> /destinationdir_onMAC

    If you haven't already, I would suggest trying an evaluation of DAVE from Thursby Software. The eval is free, fully functional, and supported.
    DAVE is able to handle large file transfer without interruption or data loss when connecting to WIndows shared folders. If it turns out that it doesn't work as well as you like, you can easily remove it with the uninstaller.
    (And yes, I work for Thursby, and have supported DAVE since 1998)

  • Canon ip5000 freezes with large files while printing via Airport Express

    I've discovered a fairly consistent problem when I print from my Powerbook G4 17" to my Canon ip5000 printer. My printer is connected to an Airport Express, which is set as a print server.
    When I print large files - say, a full-quality photo, or a web page with a lot of images - the printer freezes about 20% of the way through the document. It will hang, and the print queue just says its still printing, with the status bar at the 20% - 30% range and holding.
    If I leave things alone, eventually, the printer will spit out the unfinished print-out. The queue will continue to read "in progress" until I manually delete the print job.
    I've been able to repeat this problem with about 80% consistently, although 20% of the time, the print-out works fine (even when printing the same image that failed previously).
    Any ideas / assistance is apprecaited.
    - David

    Same problem here with my Canon ip4200. Still searching for a solution.
    I've discovered a fairly consistent problem when I
    print from my Powerbook G4 17" to my Canon ip5000
    printer. My printer is connected to an Airport
    Express, which is set as a print server.
    When I print large files - say, a full-quality photo,
    or a web page with a lot of images - the printer
    freezes about 20% of the way through the document. It
    will hang, and the print queue just says its still
    printing, with the status bar at the 20% - 30% range
    and holding.
    If I leave things alone, eventually, the printer will
    spit out the unfinished print-out. The queue will
    continue to read "in progress" until I manually
    delete the print job.
    I've been able to repeat this problem with about 80%
    consistently, although 20% of the time, the print-out
    works fine (even when printing the same image that
    failed previously).
    Any ideas / assistance is apprecaited.
    - David
      Mac OS X (10.4.7)  

  • Working with Large files in Photoshop 10

    I am taking pictures with a 4X5 large format film camera and scanning them at 3,000 DPI, which is creating extremely large files. My goal is to take them into Photoshop Elements 10 to cleanup, edit, merge photos together and so on. The cleanup tools don't seem to work that well on large files. My end result is to be able to send these pictures out to be printed at large sizes up to 40X60. How can I work in this environment and get the best print results?

    You will need to work with 8bit files to get the benefit of all the editing tools in Elements.
    I would suggest resizing at resolution of 300ppi although you can use much lower resolutions for really large prints that will be viewed from a distance e.g. hung on a gallery wall.
    That should give you an image size of 12,000 x 18,000 pixels if the original aspect ratio is 2:3
    Use the top menu:
    Image >> Resize >> Image Size

  • Probs with large files in adapter engine

    Hi all,
    in a scenario I'm currently working on, I have to process files (from file adapter). These files have 1KB up to 15MB. So I set up the tuning parameters, that files with more than 2MB are queued in this special queue for large messages. This works fine. small messages are processed directly and the larger messages are queued and processed in sequence by the integration engine.
    My problem is now on the point where the integration engine sends this large files to the adapter engine. There are always 4 messages in parallel sent to the adapter engine and this slows down the whole system due to an additional self-developed module.
    So my question is: Can I restrict the sending of the messages to only 1 at a time from integration engine to adapter engine?
    The time of processing is not important. I think I can handle this with EOIO, but is there an other way? Perhaps depending on the queue?
    Thanks
    Olli

    Hi William,
    thx for your reply.
    Yes I think it is the easiest way. But the problem is, if a message runs to a failure the others will not be processed until the failure is fixed or processing is canceled.
    So I hoped to find a solution where I can restrict the sending to the adapter engine to one message at a time in order to not affect the processing of the other messages as in EOIO.
    Regards
    Olli

  • Bug report - Finder crashes in Cover Flow mode with large files

    I just came back from the Apple store and was told that I have discovered another bug in Leopard. When in Cover Flow view in Finder and trying to browse directories with large ( multiple GB) files, Finder continually crashes and reboots, oftentimes with 2 new FInder windows.
    I created a new user on my MBP to remove the effect of any preferences and the problem repeated itself.
    Come up Apple... get on top of these bugs and issue some patches...
    Not the kind of new OS I expected from a top notch company like Apple.

    Ah... that'll be it then, they are 512 x 512. well i guess that bugs been hanging around for quite some time now, anyone got any ideas if anyone's trying to fix it? i guess making 128 x 128 icons wouldn't be the end of the world but it does seem like a step backwards.
    one thing that still confuses me... an icon file contains icons of all sizes, why does cover flow not select the right size icon to display?
    thanks for that info V.K., much obliged.
    regards, Pablo.

  • Adobe Illustrator crashes with large files

    when i open illustrator to view or edit a larger file i get
    once i hit ok, this is what i get
    this particular file is 588MB and it is an iAI file
    the computer im running this on is spec out to the following
    Win7 Ult 64bit
    I7-3770K cpu
    32 gb ram
    WD 500 GB Veloci Raptor
    samsung ssd 840 evo 120 gb scratch drive
    paging file set up as  min 33068 max 98304
    i tried with and with out extra scratch disk, with paging file set and with paging file set to system managed.
    i have uninstalled ai and re installed same response

    A 588 MB AI File? From where? CS5 is 32bit and expanding such a large file may simply go way beyond the measly 3GB you have in AI plus if it was generated in another program there may be al lsorts of otehr issues at play. This may be a hopeless cause and require you to at least instal lCS6 or CC 64bit as a trial...
    Mylenium

  • DW MX 2004 Slow with large files?

    I'm using DW MX 2004 with a static website with a few
    thousand files.
    It's very slow when opening multiple files at the same time
    or
    opening a large html file.
    But DW4 is fine, nice and quick compared with DW MX 2004.
    Is there any way to help DW MX 2004 work better with these
    files?
    Many thanks, Craig.

    Many thanks.
    But already running the 7.0.1 update.
    "Randy Edmunds" <[email protected]> wrote in
    message
    news:eggcl0$6ke$[email protected]..
    > Be sure that you've installed the 7.0.1 updater. There
    were a few
    > performance fixes, especially on the Mac, that may help
    your workflow.
    >
    > HTH,
    > Randy
    >
    >
    >> I'm using DW MX 2004 with a static website with a
    few thousand files.
    >> It's very slow when opening multiple files at the
    same time or
    >> opening a large html file.
    >> But DW4 is fine, nice and quick compared with DW MX
    2004.
    >>
    >> Is there any way to help DW MX 2004 work better with
    these files?

  • IdcApache2Auth.so Compiled With Large File Support

    Hi, I'm installing UCM 10g on solaris 64 Bit plattform and Apache 2.0.63 , everything went fine until I update configuration in the httpd.conf file. When I query server status it seems to be ok:
    +./idcserver_query+
    Success checking Content Server  idc status. Status:  Running
    but in the apache error_log and I found the next error description:
    Content Server Apache filter detected a bad request_rec structure. This is possibly a problem with LFS (large file support). Bad request_rec: uri=NULL;
    Sizing information:
    sizeof(*r): 392
    +[int]sizeof(r->chunked): 4+
    +[apr_off_t]sizeof(r->clength): 4+
    +[unsigned]sizeof(r->expecting_100): 4+
    If the above size for r->clength is equal to 4, then this module
    was compiled without LFS, which is the default on Apache 1.3 and 2.0.
    Most likely, Apache was compiled with LFS, this has been seen with some
    stock builds of Apache. Please contact Support to obtain an alternate
    build of this module.
    When I search at My Oracle Support for suggestions about how to solve my problem I found a thread which basically says that Oracle ECM support team could give me a copy IdcApache2Auth.so compiled with LFS.
    What do you suggest me?
    Should I ask for ECM support team help? (If yes please tell me How can I do it)
    or should I update the apache web server to version 2.2 and use IdcApache22Auth.so wich is compiled with LFS?
    Thanks in advance, I hope you can help me.

    Hi ,
    Easiest approach would be to use Apache2.2 and the corresponding IdcApache22Auth.so file .
    Thanks
    Srinath

  • Read parameter error -50 with larger file - please help

    I have this line of code: (read sfRef from SourcePosition as data)
    It works fine with these 811.2MB files but when I try to read from a 1.62GB file I get parameter error -50. Did I miss something about larger files?

    found it!
    You can't read larger than 1gb. I had it grab the data in multiple pieces and it works now.

  • My iPhone 4s will not forward emails with large files, pictures etc attached. How can I fix this?

    How do I get my iPhone to forward or send large files? Such as pictures.

    Check Settings>Messages>MMS Messaging to see if it's set to "On". Check with your carrier to see that your account is properly provision. Check to see if your carrier is a supported iPhone carrier. Not all features work or work properly on unsupported carriers.
    Best of luck.

Maybe you are looking for

  • Why aren't my photos shown in my cloud?  My photo stream is ON.

    When I log into my Icloud account, my photos are not shown.  My contacts, mail, notes, etc are there.  My photo stream on my Iphone (my only Apple device) is turned ON.  Can you tell my why my photos are not shown in my cloud when I have them set to

  • Why FSK demodulator output different bitstreams in case of the same inputs of different lengths?

    Hi everyone,    Recently I was trying to do FSK demodulation with Labview and my USRP2.    I did the following two tests, but found a strange phenomenon:    In the first test, I use the demodulator to demodulate a waveform of 18399 samples, where the

  • Bank Details link under Personal Information is not appearing

    Hi All,     In ESS if I attach a ESS user to any US employee then i am not able to see the link for bank details under Personal Information. I have maintained all the steps like, 1)Services maintained and the link resource is maintained for US . 2) s

  • HELP: Flash CS5, can't publish for flash player 4

    Hello! I want to create a flash ad for google AdWords using Flash CS5. according to the guidelines (http://adwords.google.com/support/aw/bin/static.py?hl=en&page=guide.cs&guide=1308145&topic =1310862&answer=176108&rd=2) I am required to publish for f

  • Problems with a driver for PCCAM-300

    I need a driver for PCCAM-300 and I have Windows XP. I've already downloaded two diferent drivers: 1. PCCAM300DrvsV_04.exe 2. PCCAM300Drv.exe When I tried to install them I had problems because this softwares were not compatible for Windows XP (but w