В последнее время у приложения, которое успешно работало в течение нескольких лет, начались серьезные проблемы. Приложение представляет собой приложение Spring. Он работает на Tomcat 8.0.22, который получает запросы от Inte rnet.
Основные проблемы:
1) В Chrome (ТОЛЬКО) пользователи часто сталкиваются с ошибкой ERR_CONNECTION_RESET. Это может произойти при обновлении sh любой страницы в браузере (нажатием клавиши F5) или при публикации данных формы с помощью кнопок отправки. Вторая ситуация более болезненна, потому что все данные, которые вводят пользователи, не сохраняются.
2) Вторая проблема, связанная с загрузкой файлов на сервер через те же формы с помощью кнопок отправки, - это высокая вероятность того, что загрузка может быть прервана в случайном проценте. В окне Tomcat я вижу что-то вроде:
org.springframework.web.multipart.MultipartException: Could not parse multipart
servlet request; nested exception is org.apache.commons.fileupload.FileUploadBas
e$IOFileUploadException: Processing of multipart/form-data request failed. null
at org.springframework.web.multipart.commons.CommonsMultipartResolver.pa
rseRequest(CommonsMultipartResolver.java:165)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.re
solveMultipart(CommonsMultipartResolver.java:142)
at org.springframework.web.servlet.DispatcherServlet.checkMultipart(Disp
atcherServlet.java:1073)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
erServlet.java:912)
at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
rServlet.java:877)
at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
workServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServ
let.java:868)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkSer
vlet.java:842)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52
)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doF
ilterInternal(OpenEntityManagerInViewFilter.java:176)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.invoke(FilterSecurityInterceptor.java:118)
at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.doFilter(FilterSecurityInterceptor.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.ExceptionTranslationFilter.do
Filter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.SessionManagementFilter.doFi
lter(SessionManagementFilter.java:103)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AnonymousAuthenticati
onFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.rememberme.RememberMe
AuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.servletapi.SecurityContextHolderAwar
eRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter
.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.www.BasicAuthenticati
onFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AbstractAuthenticatio
nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(
RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.logout.LogoutFilter.d
oFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.ConcurrentSessionFilter.doFi
lter(ConcurrentSessionFilter.java:125)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi
lterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInterna
l(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern
al(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:614)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAcce
ssLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpo
int.java:1521)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoin
t.java:1478)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: P
rocessing of multipart/form-data request failed. null
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:359)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(
ServletFileUpload.java:126)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.pa
rseRequest(CommonsMultipartResolver.java:158)
... 83 more
Caused by: java.net.SocketTimeoutException
at org.apache.tomcat.util.net.NioBlockingSelector.read(NioBlockingSelect
or.java:202)
at org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:
251)
at org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:
232)
at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInput
Buffer.java:133)
at org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doR
ead(InternalNioInputBuffer.java:177)
at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityI
nputFilter.java:110)
at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuff
er.java:416)
at org.apache.coyote.Request.doRead(Request.java:469)
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.j
ava:338)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:363)
at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:3
52)
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStrea
m.java:94)
at org.springframework.web.util.ContentCachingRequestWrapper$ContentCach
ingInputStream.read(ContentCachingRequestWrapper.java:179)
at org.springframework.web.util.ContentCachingRequestWrapper$ContentCach
ingInputStream.read(ContentCachingRequestWrapper.java:179)
at java.io.InputStream.read(InputStream.java:170)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAva
ilable(MultipartStream.java:959)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(Mu
ltipartStream.java:887)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:354)
... 85 more
Операционная система сервера: Windows Server 2008 R2.
Характеристики сервера: Intel Xeon CPU E7 - 4820 @ 2,00 ГГц, ОЗУ 32 ГБ.
Это часть сервера Tomcat . xml:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443"
compression="on"
compressionMinSize="100"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/css,text/javascript, application/x-javascript,application/javascript" />
<Connector port="443" maxHttpHeaderSize="8192" maxThreads="1000" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true" maxSwallowSize="-1" maxKeepAliveRequests="-1"
acceptCount="200" scheme="https" secure="true"
SSLEnabled="true" clientAuth="false" sslProtocol="TLS"
keyAlias="..." keystoreFile="..." keystorePass="..." />
Здесь Аргументы JVM :
-Djava.awt.headless=true
-Dfile.encoding=UTF-8
-Xms256m
-Xmx12g
-XX:MetaspaceSize=256m
-XX:MaxMetaspaceSize=512m
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
Любая помощь приветствуется.
Спасибо!