Client memory - 64MB limit?

Questions, answers, tips and ideas on Servoy Client

Client memory - 64MB limit?

Postby Neale » Tue Aug 03, 2004 12:06 pm

I think I've isolated the cause of a method failing only in servoy client to memory exhaustion.

The symptoms are that the method runs without complaint but after several minutes stops with an error dialogue: "Error while executing method with name methodName, id 2823". This happens at approximately (but not exactly) the same record (around 5000 out of 6500) each time the method is run.

I presume it's significant that in Help->About the memory is listed as 65088K allocated. If the method is run with the About dialogue open, used memory is seen to rise to at least 58800K (it later drops to ~24000K used).

Am I bumping into a 64MB VM limitation?

FWIW, the method executes a search which returns ~6000 records then runs a loop through this foundset to sum a field. Curiously, this works just fine (and gets the correct result) if run in Developer (although memory usage does get uncomfortably high).

This is with Servoy 2.0.4-build 277. Server is running java 1.4.2. Verified same behaviour with client running on Linux (Java 1.4.2_03-b02(Linux)) and Mac (Java 1.4.1_02-24(Mac OS X)).

Any ideas?

Thanks,
Neale.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Neale » Wed Aug 04, 2004 4:56 am

A related observation...

If I run a more complex method (still looping over the same ~6000 record foundset) in developer and monitor the memory usage in Help->About I see the memory allocated go up to >65000K then used memory approaches this but periodically drops back by ~20MB - so the graph is a sawtooth-type pattern.

Conversely, in client I only saw a single increase in the graph of used memory and failure when this approached 65000K.

That any help?

Thanks,
Neale.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby pbakker » Wed Aug 04, 2004 8:50 am

Jus a comment: If you're just looping over 6000+ records to get the sum of the values in a specific column, you would be a lok better of doing this directly with an SQL statement on the DB

select sum(field) from table where field xxx = yyy

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby Jan Blok » Wed Aug 04, 2004 11:14 am

In Servoy 2.1 it is possible to set the client mem. use, to anything above 64M, but more important in Servoy 2.1 rc2 you likely don't need to change it, we did some major memory/performance improvements.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Neale » Wed Aug 04, 2004 1:19 pm

Paul: You're right - if I just wanted the sum that's how it'd be best done. But the method I refered to is a cut-down of the original, intended to demonstrate the problem wasn't tickled by anything else I was doing (almost a minimal case) - the original method creates a record in another table for each record in the foundset.

Jan: Good to hear about 2.1 being leaner (>64M did seem like a rather excessive memory requirement for this task). Is the only solution to this to upgrade to pre-release?

Thanks,
Neale.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Neale » Tue Oct 19, 2004 9:39 am

Jan Blok wrote:In Servoy 2.1 it is possible to set the client mem. use, to anything above 64M,

Where/how do we set this?

Jan Blok wrote:but more important in Servoy 2.1 rc2 you likely don't need to change it, we did some major memory/performance improvements.

Sadly, after upgrading the server to 2.1 (build 310) it fails in a similar way :-(
It's failing sooner than with 2.0; and the error is "id 2821"

Any ideas?

Thanks,
Neale.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Jan Blok » Tue Oct 19, 2004 10:13 am

Q1) Where/how do we set client mem size?
A) admin page

Q2) error "id 2821"
A) this is NOT a servoy error! where do you get this? why do you relate this error to a mem shortage?
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Neale » Tue Oct 19, 2004 1:13 pm

Jan Blok wrote:Q1) Where/how do we set client mem size?
A) admin page


Found this, and changed it to 128MB - the method now runs to completion, but appears to use >100MB - that's an unsettlingly large amount of memory for a list of ~6000 records.

Jan Blok wrote:Q2) error "id 2821"
A) this is NOT a servoy error! where do you get this? why do you relate this error to a mem shortage?


How "odd" - as described in the opening post of this thread, after the method has run for several minutes an error dialogue pops up which reads: "Error while executing method with name methodName, id 2821" - note taht with Servoy 2.0 trhe error id was 2823 but with 2.1 it's 2821. If it's not a Servoy error then I'm as puzzled as you as to how such a dialogue could pop up when running this method in Servoy Client.

The original reason for relating this to memory was the the memory usage as displayed in Help->About climbed to near 64M then this dialogue popped up. Now with 2.1 it's like that unless I increase the client memory (to 128M) - i.e. increasing the client memory setting makes this problem go away.

Thanks,
Neale.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Jan Blok » Tue Oct 19, 2004 1:32 pm

Ah the id is the method_id, will make this more clear in the error msg, but what are you doing in that method? handling largeblobs/media?
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Neale » Tue Oct 19, 2004 2:02 pm

No, nothing large like media or blobs - just text and numbers.

The method finds a foundset of several thousand records then interates through this foundset, creating a record in a child table for each of the records in the foundset. That's essentially it - nothing I can see that I'd expect to chew up megabytes and megabytes.

Thanks,
Neale.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 5 guests