Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Concurrent Request Processing Issue

 
Yang Guang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My JSF application uses myfaces 1.1.1. Our users sometime ran into strange errors -- http 500 error page, javascript errors when a page was being loaded, or partially painted page. In our testing environment, I found that these strange errors can sometimes occur when two users were doing actions that caused the two pages to load/reload at the same time. The tomcat server�s debug was turned on, each time the strange error occurred, I looked through the log to analyze what was going on. What I saw in the log tells me that each time such error occurred, the threads for both users were busy, but one thread would finish normally, the other would either have NoSuchElementException as soon as it tried to process the request (this caused 500 error), or it would seem like it finished normally but actually was missing many steps (this caused partially painted window problem or javascript error on the window). Have anyone seen this kind of concurrent request processing (from two different sessions) errors? Note that most of the time concurrent requests were processed without error, only sometimes the error occurred.
 
Duc Vo
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe a good start is to check if any of your application scope backing beans which are not thread safe.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yang Guang:
My JSF application uses myfaces 1.1.1.

That's really ancient. It's already over 3 years old. Upgrade to the latest 1.1 implementation available. Or if there is room, better upgrade to the latest 1.2.

Our users sometime ran into strange errors -- http 500 error page, javascript errors when a page was being loaded, or partially painted page. In our testing environment, I found that these strange errors can sometimes occur when two users were doing actions that caused the two pages to load/reload at the same time. The tomcat server�s debug was turned on, each time the strange error occurred, I looked through the log to analyze what was going on. What I saw in the log tells me that each time such error occurred, the threads for both users were busy, but one thread would finish normally, the other would either have NoSuchElementException as soon as it tried to process the request (this caused 500 error), or it would seem like it finished normally but actually was missing many steps (this caused partially painted window problem or javascript error on the window). Have anyone seen this kind of concurrent request processing (from two different sessions) errors? Note that most of the time concurrent requests were processed without error, only sometimes the error occurred.


Either there's a bug in MyFaces implementation used, or there's simply a bug in your code. Hard to say without knowing the details.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic