Some of users of my wf-app seem to face an error 500 while working. The errors show a viewExpiredException as cause of the problem. Generally this points to a session timeout issue. But as the user fires several request within seconds it doesn't make much sense, that one of the requests should fail with error 500 while others can be served as expected.

Unfortunately the behaviour is not 100% reproducible on any dialog. The logs expose the problem for several users but there is no clear pattern to find out which behaviour leads to these errors. Do I have any chance to isolate the real issue behind these error 500 logs?

asked 13.05.2019 at 07:02

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
accept rate: 77%

edited 13.05.2019 at 07:36

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦

These failures often occur when AJAX requests are being fired against the Engine. In most cases an Html Dialog has already been closed in the Process (Dialog Exit Event), but the users still sees the last view (and eventually Ajax Requests are being provoked) just before the redirect to the next real page within the workflow app is being sent.

To find the ajax element on the view which causes the problem is not that easy. As there are probably many elements with AJAX capabilities within your User Dialog. But you can get close to the element by enabling request logs on the Engine. Request logs will expose all data that is sent from a Dialog User and save it for later analysis. For ajax requests this is interesting because the payload of such a request will contain the AJAX ids that are being asked to update. And with this information you should be able to detect the element on the view that fires these requests.

Client request: alt text Server side log of this request: alt text

How to enable Request Logs

WARNING: enabled request logs will produce tremendous log data. Check that enough disk space is available or the engine will even refuse to start once there is no space left.

[1.] Enable the internal tomcat request log filter in webapps/ivy/WEB-INF/web.xml by adding the following xml config:


alt text

[2.] Route tomcat logs into an extra request log file with the configuration/log4jconfig.xml. Do so by adding the following xml config:

<log4j:configuration debug="false" xmlns:log4j="">
    <!-- Defines a log file called request.log -->
    <appender name="requestLog" class="org.apache.log4j.DailyRollingFileAppender"> 
        <param name="File" value="${user.dir}/logs/request.log"/> 
        <param name="DatePattern" value="'.'yyyy-MM-dd"/> 
        <layout class="org.apache.log4j.IvyLog4jLayout"> 
            <param name="DateFormat" value="HH:mm:ss"/>

    <!-- limit the pressure on the filesystem -->
    <appender name="asyncRequestLog" class="org.apache.log4j.AsyncAppender">
            <param name="BufferSize" value="50000" />
            <appender-ref ref="requestLog" />

    <!-- route RequestDumperFilter logs to own file -->
    <category name="org.apache.catalina.filters.RequestDumperFilter" class="ch.ivyteam.log.Logger">
      <appender-ref ref="asyncRequestLog"/> 
      <priority value="DEBUG"/>

alt text


answered 13.05.2019 at 07:08

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

edited 13.05.2019 at 07:45

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 13.05.2019 at 07:02

Seen: 3,324 times

Last updated: 13.05.2019 at 07:45