Yes, the file failing is 67,268,608 bytes and it is 64 bit JVM. Surprisingly
I have got bigger 81,155KB file got processed successfully.
From: Kevin Day [via iText - General]
[mailto:ml-node+s2136553n4660194...@n4.nabble.com]
Sent: Tuesday, August 05, 2014 3:30 PM
To: Chandrashekhar Pandhare
Subject: Re: Rebuild failed: Map failed; Original message: Map failed
ok - thanks - what is the size of the file?
Also, are you running 32 bit JVM or 64 bit JVM?
The problem is that memory mapping is failing. If the file is smaller than
67,108,864 bytes, then iText is attempting to map the entire file. If it is
above that amount, iText will map chunks of the file dynamically. Given where
this failure is happening, my guess is that the file is larger than that
threshold, so we are into dynamic paging. In this case iText will open up to
16 mapped chunks, after which it will start releasing them.
If the server doesn't have sufficient contiguous blocks of address space to
allocate a 67MB chunk, then the map will fail. So I suppose that it's possible
that your server may be somewhat memory constrained (note that this is not
related to memory allocated to the JVM - it is direct operating system RAM)...
You can fine tune this behavior by constructing and passing a
RandomAccessSource to PdfReader instead of using the default behavior. See the
code in RandomAccessSourceFactory.createBestSource()... You can also just call
setUsePlainRandomAccess(true) on the RandomAccessSourceFactory and use it that
way. Performance won't be the same, but that avoids memory mapping issues
entirely.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://itext-general.2136553.n4.nabble.com/Rebuild-failed-Map-failed-Original-message-Map-failed-tp4660182p4660194.html
To unsubscribe from Rebuild failed: Map failed; Original message: Map failed,
click
here<http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4660182&code=Q2hhbmRyYXNoZWtoYXIuUGFuZGhhcmVAY2l0aXplbnNmbGEuY29tfDQ2NjAxODJ8MTE0NjYyNjMyNQ==>.
NAML<http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Rebuild-failed-Map-failed-Original-message-Map-failed-tp4660182p4660195.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php