简体   繁体   中英

Application does not respond after several fileupload

I am doing a jsp which summit a treatment based on uploading a file. My application is in java and runs under Tomcat 8. The problem is that the jsp works fine until the seventh times it is called. A the seventh times the application does not respond anymore.

Some more informations. On Tomcat 6 there is no problems. I use file-commons 1.4 and commons-io 2.2. The garbage collector has no effets. I can not reproduce the problem in local. (It always works). I use tomcat 8.5.4. The application is not only used by me so it is difficult to upgrade Tomcat. I have the error "java.sql.SQLException: Cannot get a connection, general error".

''' java Dans le jsp.

getCurrentData().setUrlStyleReport(" enctype=\"multipart/form-data\" "); 

''' java // Permet de gérer le multipart. ''' java dans la servlet

import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUpload;
if(FileUpload.isMultipartContent(req)){

''' java

It seems that you are consuming the db connection pool. This probably means that you are openning connections but you are not closing them. Try to check the limits of number of connections to the db and the process of openning and closing them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM