Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
zoomphoto  
#1 Posted : Thursday, June 26, 2008 3:21:47 PM(UTC)
zoomphoto

Rank: Member

Groups: Member
Joined: 4/4/2008(UTC)
Posts: 11

I get the following error when I try and upload more then 100 or so images:

Exception in thread "AWT-EventQueue-2" java.lang.OutOfMemoryError: Java heap space

Here is my code:

Code:

var iu = new ImageUploaderWriter("ImageUploader1", 930, 400);

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = "ImageUploader5.jar";
iu.javaAppletCodeBase = "/_inc/uploader/";
iu.javaAppletCached = true;
iu.javaAppletVersion = "5.1.10.0";

iu.showNonemptyResponse = "off";

//Configure License Keys
iu.addParam("LicenseKey", "72050-10000-C6DFB-9B203-6E509");

//Configure appearance and behaviour.
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("FolderView", "List");
iu.addParam("UploadView", "List");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("ShowDescriptions", "false");
iu.addParam("BackgroundColor", "#ffffff");

iu.addParam("FilesPerOnePackageCount", "100");

//Configure Image Uploader to rotate photos automatically
//according to the orientation stored in EXIF metadata.
iu.addParam("AllowAutoRotate", "true");

//Append the form with total file size to the upload.
iu.addParam("AdditionalFormName", "Form1");

//Configure file mask to upload JPEG images only.
iu.addParam("FileMask", "*.jpeg;*.jpg;*.jpe");

//Set image size restrictions.
iu.addParam("MinImageWidth", "333");
iu.addParam("MinImageHeight", "333");

//Exclude the source file from upload because only
//resized versions of the photo will be sent.
iu.addParam("UploadSourceFile", "false");

//Configure settings of the optimized image. Optimized image
//is resized to 1200x1200 with JPEG quality = 60 and EXIF
//metadata is preserved.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "500");
iu.addParam("UploadThumbnail1Height", "500");
iu.addParam("UploadThumbnail1JpegQuality", "80");
iu.addParam("UploadThumbnail1CopyExif", "true");

iu.addParam("UploadThumbnail1Watermark",
    "ImageUrl=http://www.zoomphoto.ca/v4/_img/watermark/101_watermark.png;ImageWidth=86;ImageHeight=63;" + "Position=Center;Opacity=50");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "150");
iu.addParam("UploadThumbnail2Height", "150");
iu.addParam("UploadThumbnail2JpegQuality", "60");

iu.addParam("ExtractExif", "ExifDateTime");

//Configure URL files are uploaded to.
iu.addParam("Action", "http://www.zoomphoto.ca/upload_event_images.php");

//Configure URL files are uploaded to.
//iu.addParam("Action", "upload.php");

//Add event handlers.
iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
iu.addEventListener("Progress", "ImageUploader_Progress");
Dmitry  
#2 Posted : Thursday, June 26, 2008 4:31:28 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Could you provide us with the additional information?
1. On what browser and OS does this problem happen?
2. What thumbnail size do you try to upload? 500x500 or 1200x1200?
3. Could you attach the watermark image to this post?
4. Have you noticed? Is there some specific file causing the problem?
5. Could you send us the link to the page on your site where Image Uploader is installed? If it is not appropriate for you to post the link here on public forum, you can submit a case.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
zoomphoto  
#3 Posted : Thursday, June 26, 2008 10:22:38 PM(UTC)
zoomphoto

Rank: Member

Groups: Member
Joined: 4/4/2008(UTC)
Posts: 11

The files I am uploading are 500x333... the 1200x1200 is only a comment in the code, I would ignore that.

It happens anytime I try and upload more than a few dozen files it seems. My system is a Win XP.

The issue is that I have client which will upload 1,000-5,000 images at a time. But I can't get the system to accept that many files... What is the ideal set up? I would post up but it's behind a userid. If I make a user id would that be okay for you to logon and see what I am doing?



OH, and this upload works perfectly if I choose less than 75 files or so. So I know that the code works... it does everything as expected, it only fails on large upload queues.

Edited by user Thursday, June 26, 2008 10:23:34 PM(UTC)  | Reason: Not specified

Dmitry  
#4 Posted : Friday, June 27, 2008 3:12:00 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Okay, thank you for the information. If your customer wants to upload 5000 images at a time, Java machine can exceed the limit of available memory. It is limitation of Java platform.

To eliminate this problem, you may limit the number of files uploaded at a time. So 5000 files will be broken into a few upload sessions.

Currently we are refactoring Java version to improve speed and reduce memory usage. As soon as we finish, we will release it. Unfortunately I am not ready now to disclose when we will be ready to do it.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
zoomphoto  
#5 Posted : Saturday, June 28, 2008 1:06:48 PM(UTC)
zoomphoto

Rank: Member

Groups: Member
Joined: 4/4/2008(UTC)
Posts: 11

What would a reasonable number of files for the upload be then?

Having to do it 100 at a time makes the product useless for me... I can't seem to get much more than that. It is server side, or client side memory that is maxing out?
Dmitry  
#6 Posted : Sunday, June 29, 2008 4:53:38 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
It is client side problem; JRE has limitation on amount of allocable memory. The Image Uploader can exceed the limitation in some cases. The amount of files uploading without memory problems depends on particular files, system, JRE and so on. Try to set
Code:
iu.addParam("FilesPerOnePackageCount", "1")
it will reduce the memory usage to upload each package.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
homersim  
#7 Posted : Saturday, April 18, 2009 11:26:41 PM(UTC)
homersim

Rank: Newbie

Groups: Member
Joined: 4/18/2009(UTC)
Posts: 2

Hello, I have come across this problem when simply trying to choose which photo I would like to upload via the three pane advanced view portal and where the number of images inside the directory is in excess of 800. I found a solution at the following link and the module works perfectly now. Maybe it will help you, too.

http://www.duckware.com/...ncreaseappletmemory.html

Lance.

Edited by user Saturday, April 18, 2009 11:27:41 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.