A  bug has been filed on the MarkLogic side to track this and make it 
friendlier.

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Neil
Sent: Monday, July 18, 2011 12:52 PM
To: 'General MarkLogic Developer Discussion'
Subject: Re: [MarkLogic Dev General] MarkLogic Failing to Start

Jason,

I understand this, and I was being lazy just ramping up the caches to try to 
shoe-horn the large XML file into the database, instead of setting up 
fragmentation or assessing whether I was trying to garb more memory than was 
available. But I am still surprised that MarkLogic reacts in the way it does 
when it cannot obtain the requested memory. Simply collapsing without warning, 
and requiring me to edit XML files is crude (once I knew where to look), is 
just not friendly. I think it should still launch, setting all caches to 
minimum, and warn me that it has done this, so that I can use the Admin 
interface to reset that memory requirements. It just seems like an unusual 
rough edge to the product, that's all.

Regards,

Neil.


From: [email protected] 
[mailto:[email protected]] On Behalf Of Jason Hunter
Sent: 17 July 2011 02:25
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] MarkLogic Failing to Start

On Jul 16, 2011, at 14:04, "Neil" 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

I am using MarkLogic 4.2 on Windows 7. It has worked fine for a long time, but 
today I tried to load a large XML file and it was failing due to memory 
constraints.

Note that for good performance you should either break your large document into 
smaller documents, or add fragmentation rules so MarkLogic breaks your document 
implicitly.  Rarely do you want a truly large XML document stored as a single 
fragment.

In fact, the rule of thumb when you get a memory error with MarkLogic during 
development is don't blindly increase your memory sizes.  Try to fix the thing 
that consumes excessive memory.  If it's a document load, fragment the document 
or break it into multiple documents.  If it's a query getting an expanded tree 
cache full error, there's almost always a way to write more memory efficient 
code.  It's like when you hit an infinite loop, don't just get a faster CPU.  :)

There are of course times to adjust memory, like when a node is specializing as 
an E or D node, and you want to optimize caches for the specialized role.

2011-07-16 10:38:25.475 Emergency: Initialization: SVC-MEMALLOC: Memory 
allocation error: VirtualAlloc 536870912 bytes: Not enough storage is available 
to process this command.
Obviously I cannot get to the Admin screen to change the memory allocation 
settings. And I cannot see where they are stored to reset them myself. Can 
anyone help me here?

I see you're running out of virtual memory, not physical memory.  This tell me 
you're probably on a 32-bit system.  You should really get on a 64-bit system 
if you're going to do anything non-trivial.  Also make sure your swap space is 
2x your physical memory, which helps the OS allocate sufficient virtual memory.

There's docs that talk about all this administrivia:  
http://developer.marklogic.com/docs

-jh-

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to