Dear All,
I am getting a strange issue with an application deployed under tomcat
4(4.1.31) that when I am trying to upload a file through browser along with the
form data to the tomcat, file stream reader getting read timed out exception.
In fileupload application I am using following code snippet.
MultipartParser parser = new MultipartParser((HttpServletRequest) request, 1805
* 1024);
Part aPart;
while ((aPart = parser.readNextPart()) != null) {
if (aPart.isFile() == false) {
//read form data
} else if (aPart.isFile() == true) {
//read file
InputStream is = fPart.getInputStream();
bis = new BufferedInputStream(is);
byte[] buffer = new byte[1024 * 1024];
ByteArrayOutputStream baostream = new ByteArrayOutputStream();
int bytesRead = 0;
while ((bytesRead = bis.read(buffer)) != -1) { --> I am getting
read timed out exception here
}
}
}
}
One more thing what is observed that tomcat is taking 1025m virtual memory :(.
When I upload a file which is smaller in size It's getting succeeded.
Any idea ?
Regards,
Ningappa Koneri
This e-mail and all material transmitted with it are for the use of the
intended recipient(s) ONLY and contains confidential and/or privileged
information. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies and the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken pursuant to the contents of the
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its management
or directors, are unable to exercise control or ensure the integrity over /of
the contents of the information contained in e-mail. Any views expressed herein
are those of the individual sender only and no binding nature of the contents
shall be implied or assumed unless the sender does so expressly with due
authority of Comviva Technologies Limited. E-mail and any contents transmitted
with it are prone to viruses and related defects despite all efforts to avoid
such by Comviva Technologies Limited.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]