Overview
504 Errors can happen for many reasons. These include long-running or blocking queries in the database, trouble connecting with EPX, timeout settings, long processing times for specific requests in the Enterworks server, and network issues.
Active 504 Error Situation
If the system is currently having 504 errors, you should capture the following items:
- Tomcat manager server page, showing the Complete Server Status. This will show any long-running requests and help find the cause.
- Thread dump of Tomcat process:
- Find the Tomcat/Jboss PIDs from Windows Task Manager, and ensure the box has Windows dll file sawindbg.dll installed.
- Use the command:
jstack -F EPIM_Tomcat_PID >> EPIMTomcatThreadDump1.log
- Log files:
- Enterworks/logs/EnableServer/webMaster*.log
- Enterworks/logs/EnableServer/tomcat/tomcat.log
- Enterworks/log/EPX/*.log
Database Status
While in the SQL Server Management Studio, select the EPIM database, and use the
sp_whoisactive
function to see what kind of queries are
currently active. Consider the following:
- Expensive or blocking queries from a Scheduled Export of "View" type.
- Expensive queries from a UI search using a custom user preference with specialized sorting.
- Expensive queries from an import using alternate primary keys.
- Use the Index Fragmentation Report to see if the database needs maintenance.
EPX Status
Enterworks connects with EPX to send work items for certain user activities. If there are a lot of "stuck" work items, this can cause EPX to not respond to Enterworks in a timely manner. Use the following query to show the status of all work items in the system:
select wis.ProcessName, a.NAME as ActivityName, case when (a.ACTIVITY_TYPE_CODE = 1) then 'AUTOMATIC: ' + a.ARC_ACTOR_NAME ...
For work items "stuck" in a processing flow, login to Design Console and view some of the work item statuses to determine why they are stuck. Resolve the issue and clear the stuck work items.
Timeout Settings
The enable2020-webcm-broker-service
and the
enable2020-web-server-service
have timeout settings that can be
configured. The startup scripts for these services can be found in
Enterworks\enable2020\services\bin.
Enterworks Processing Status
If reviewing the user preferences, indexes, and search conditions doesn't help, take some thread dumps of the Tomcat process. This will help Engineering figure out what processing is happening.
Network Status
If checking Enterworks, the database, and EPX does not show any problems, the issue might be with the your network. In this case, you will need help from your IT department.