(Suspecting) broken connection behavior

Image scaler add-on.

Re: (Suspecting) broken connection behavior

Postby support » Sun Oct 05, 2008 9:36 am

I need you to provide a procedure to allow me to reproduce the problem so I could help.
What about the configuration of your php.ini file ? Most PHP server are setup to allow only 2MB file upload maximum.
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Re: (Suspecting) broken connection behavior

Postby dstonek » Sun Oct 05, 2008 1:25 pm

Maximum file upload size and Maximum HTTP POST size are set to 15MB.
But this is not the point.
The applet must not upload such heavy files.
It has to resize them all to 500 pixels the longest side and then upload to server.
Files will be no more than 100Kb.
I got this problem with two different film scanned files.
There was no problem with a flat scanner (meta info near to nothing) I have in my desk
dstonek
 
Posts: 52
Joined: Fri Mar 21, 2008 3:19 pm

Re: (Suspecting) broken connection behavior

Postby support » Sun Oct 05, 2008 7:56 pm

And could you share the files that cause the problem ?
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Re: (Suspecting) broken connection behavior

Postby dstonek » Sun Oct 05, 2008 9:51 pm

Yes, they are photos from Wikipedia.org
I posted a link in an earlier post.
Despite the applet error message the files are uploaded to their target dir.
Example 1
Example 2
They all were not downsampled by the applet.
Thanks
PS: not all no resized uploads got that error msg I posted in a snapshot.
Last edited by dstonek on Mon Oct 06, 2008 7:09 pm, edited 1 time in total.
dstonek
 
Posts: 52
Joined: Fri Mar 21, 2008 3:19 pm

Broken connections solution

Postby dstonek » Mon Oct 06, 2008 12:12 pm

For the broken connections issue...
My problem wasn't to resume a large file uploads but a large amount of small files.
I made some changes and my first attempt went good.
document.writeln('<PARAM NAME="resume" VALUE="true">');
document.writeln('<PARAM NAME="retry" VALUE="10">');
document.writeln('<PARAM NAME="retrydelay" VALUE="20">');

I am using POST, not PUT method
In process file I've added the part that refers to
if ($_SERVER['REQUEST_METHOD'] == 'HEAD'){ ... }
without modifications (php sample you provide.
dstonek
 
Posts: 52
Joined: Fri Mar 21, 2008 3:19 pm

Re: (Suspecting) broken connection behavior

Postby support » Mon Oct 06, 2008 5:51 pm

Image samples have large dimensions. More than 3000x3000.
Example 1 is 6400 x 5378 pixels which leads to OutOfMemory issue (by default Applet can run in 64MB heap size). When I try to scale it I get: Failed Montreal_City_Hall_Jan_2006.jpg Java heap space. See: http://www.jfileupload.com/products/jim ... aq.html#18
The applet detects it has not enough memory to scale image so it uploads the image as is. That's why you get the original file on server.
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Re: (Suspecting) broken connection behavior

Postby dstonek » Mon Oct 06, 2008 7:16 pm

Ok, thanks I'll follow that suggestions and try again.
Just in case I prevent this events and set to resample those files in server side in process file.
dstonek
 
Posts: 52
Joined: Fri Mar 21, 2008 3:19 pm

Re: (Suspecting) broken connection behavior

Postby dstonek » Mon Oct 06, 2008 8:26 pm

Solutions you suggest:
1 - Increase heap size for applets in client-side Java control panel. Under windows :
Start->Control Panel->Java->Java tab->Java plugin runtime->Display and add
the following in execution parameters : -Xmx128m
2 - Use smaller values for maxwidth and maxheight (for instance 3000x3000).
3 - Use impl=ImageIOSubsample to select a subsample scaling algorithm. This one
allows integer scale factor only so it won't fit exactly to maxwidth and
maxheight.
4 - (not available yet) JRE 1.6 Update 10 will allow to setup heap size as applet
parameter. So, workaround#1 above will be easy to setup.


1.- I avoid to complicate the user with client program settings. This will be the very last solution.
2.- My max values are 500x500 Target files must fit into this square.
3.- Because of that sharpening issue I prefer to impl=awt
4.- I don't know which update is JRE 1.6 at this time in java.com

I took another file and manually resampled to 6000x4500
This is a Firefox-Linux environment.
Java Plug-in 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
Memory: 65,088K Free: 52,097K (80%) ... completed.
The applet could not resize this file and started uploading as it is.

In the same computer I have a vmware Win XP window.
IE6
Java Plug-in 1.6.0_07
Usar versión JRE 1.6.0_07 Java HotSpot(TM) Client VM
Memory: 55.516K Free: 50.062K (90%) ... terminado.
It did resize the same file!

Now I am testing your suggestion #1
In FF
Memory: 11,584K Free: 5,199K (44%) ... completed.
Now the applet have resized the file!
dstonek
 
Posts: 52
Joined: Fri Mar 21, 2008 3:19 pm

Re: (Suspecting) broken connection behavior

Postby support » Mon Oct 06, 2008 8:34 pm

Solution #4 should be available soon. SUN said "Fall 2008". It will allow to setup Java heap as Applet parameter. It means that you will be able to use solution #1 without modifications in the user's Java control panel.
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Previous

Return to JImageFilter



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.