Memory Bleed?

I have noted that when I first open up Servoy Developer it uses about 65 MB of memory. I use methods to open up some JPEG and PDF files stored in the database the memory use goes up rapidly to about 95MB and I note the processor is pegging 90+ % of cyles for javaw.exe for a second or two while opening up one of these files. With use memory utilization slowly trickles up to 111 MB. When I get to 111 MB the solution grinds nearly to a stop and javaw.exe will peg the proccessor at 99% for nearly a minute when I try to open a file that formerly took 2 seconds to open. Problem resolves when I exit Servoy and restart. Memory leak? I have noted the problem over all Betas released in 2.0.

John McCann

Servoy 2.0 rc1, SQL Server, Windows

Do you look at the taskmanager for that (memory)?
please look at the AboutDialog what the usage really is in java.

i see that you use mssql, that driver does have a problem if you are using large blobls (the driver doesn't release the size it allocated for the blob, but this is reused for other blobs as far as i can see, so it is not really a leak)

Can you send a sample solution and database with images that cause issues to support@servoy.com?

I’m unable to reproduce the issue with a sample solution also using SQL Server.

Johan/Jan

I use task manager to see how much memory and how many processor resources javaw.exe is using.

I found that Firebird can’t handle blobs. You say SQL Server can’t handle blobs. What do you suggest? Can the Sybase stuff handle blobs?

I will send the solution and some blobs.

John McCann

they can handle blobs fine.
Only they both have an implementation that could be better.

firebird: don’t add large blobs to the same table as you create form for.
(just load it when you press a button or something)

sql server is working fine with blobs only sql server hold to much memory (that as far as i can see will be reused but never gived back to free up)

Johan,

I looked into this problem again viewing the memory use as you suggested. I note that Servoy continues to allocate more memory until 65 MB have been allocated. At this point it stops allocating memory. As the memory used by Servoy approaches 65 MB the application grinds to a halt. This is not just related to BLOBS as I originally thought. If I simply put the application in designer mode and flip through all of my forms I can get the application to use up all 65 MB of memory and grind to a halt. If I use my application for more than 15 minutes I run into the same problem. The problem always occurs when memory use approaches 65 MB and always resolves when Servoy is restarted.

JDM

2.0 RC2, SQL Server 2000, Windows

Are you using a animated gif on your forms?
I had the same problems you describe.
because there is a problem with using animated gif’s in Java.

look here: http://forum.servoy.com/viewtopic.php?t=897&start=15

I am not using any animated GIFS. It is a large solution with more than 100 forms. As I said I don’t even have to be running the solution to see the problem. If I just put it in designer mode and flip through the forms I exhaust the memory. I am sure the development team will figure it out.

John McCann

we don’t notice that at all.

so you go directly from browse to design and then you stay in design just jumping from one form to another?

can you show me what the about dialog memory graphic displays if you start from the first form until you have out of mem??

(the about dialog can stay open)

To add something to this discussion: Johan, as you know I have this issue too.

With c2 I have also experienced the introduction of a java outofmemory message at least once a day and more than often a complete freeze of Servoy… Looking at my about screen now I notice that all allocated memory (64mb) is used up now!

OS X 10.3.2, Servoy 2.0c2, Java 2 v1.4.1_01

Another addition: (I am working on a PowerBook 17"). The ventilators don’t run much. But when they start running it is always when the processor/harddisk is working hard… This is the case when developer is slowing down… (always when developer slows down the memory in the about window is reaching it’s maximum usage)…

please start servoy developer with these params:

java -Xmx256M -jar servoy_developer.jar

jcompagner:
please start servoy developer with these params:

java -Xmx256M -jar servoy_developer.jar

Note: You can also just change the “servoy_developer.bat” file replace the existing line 2 with the above, and you can then just double-click the servoy_developer.bat file (or make a shortcut to it).

The Dev Team is looking for a way to increase the memory by default.

Bob Cusick

Well, batch files and OS X don’t mingle too well :)

I have worked with the above mentioned memory increase and this went fine for 3,5 hours:

2,0 hrs - 110mb
2,5 hrs - 140mb
3,5 hrs - 175mb

Unfortunately after that all menu’s greyed out again and I had to pitstop the application…

After that I restarted with the normal memory assigned again. This was good for half an hour work without problems… After that developer slowed down enormously again!

Just worked for 1,5 hrs again, with a memory usage of 105mb so this looks like ‘normal behaviour’…

(not to complain btw but just to get you guys on the right track)

Well, I think the memory thing is the remedy! I have developer up and running now for eight hours!!! Allocated memory is 259264 and usde memory has been between 110 and 150 for the last three hours…

Cheers again