Welcome Guest Search | Active Topics | Members | Log In | Register

Files uploading by remote service and Java heap space Options · View
Christophe
Posted: Tuesday, May 29, 2012 1:19:39 PM

Rank: Apprentice Coder
Groups: Member

Joined: 2/22/2012
Posts: 46
Points: -262
Location: France
Hi,

I have a java class to upload files on the server that works fine for small files, but that returns the exception below for bigger files :
"Exception in thread "Store org.red5.io.amf.Output.fieldCache Spool Thread" java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.ConcurrentHashMap.size(ConcurrentHashMap.java:718)
at net.sf.ehcache.store.DiskStore.throwableSafeFlushSpoolIfRequired(DiskStore.java:670)
at net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain(DiskStore.java:642)
at net.sf.ehcache.store.DiskStore.access$900(DiskStore.java:67)
at net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run(DiskStore.java:1116)"

However, your mini-framework for handling file upload allows, in turn, upload any file size.

I need to change the file name and possibly the size of an image file, for example.

Does WebORB can allow me to use my remote service with any file size?

Do mini-framework to change the name and destination directory for the uploaded file?

Thanks you in advance.

Best regards,
Christophe
Cyril
Posted: Friday, June 01, 2012 10:58:38 AM
Rank: Administration
Groups: Administration , Member

Joined: 9/10/2009
Posts: 320
Points: 778
Location: US
Hello Christophe

am I correct with my assumption that you are trying to upload a large file through AMF? If so, I believe it is not a really good idea. AMF protocol doesn't fit for this kind of tasks and you should use the multipart file upload approach.

Thanks,
Cyril
Christophe
Posted: Monday, June 04, 2012 12:36:29 AM

Rank: Apprentice Coder
Groups: Member

Joined: 2/22/2012
Posts: 46
Points: -262
Location: France
Hello Cyril,

Thank you.

Indeed, I use the AMF protocol and it works perfectly up to 2MB.
Are you also discouraged me to use the AMF protocol to upload small size files (30KB to 700KB)?

With the multipart file upload approach, I can not change the file name or change its size (for a picture).
I used the mini-framework included in WebORB for handling file upload, but I have not found documentation to access the upload servlet.
Is there a little documentation on using this servlet?

Thanks in advance for your help,

Christophe
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v4.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.082 seconds.