---
title: "Finding Code: Blocked Sessions"
description: progress OpenEdge blocked sessions protop find code
image: https://blog.wss.com/hubfs/wss-article-03-2022-finding-code.png
---

[![OpenEdge Experts - White Star Software](https://blog.wss.com/hs-fs/hubfs/logoWSS_H-2.png?width=600&height=225&name=logoWSS_H-2.png "OpenEdge Experts - White Star Software")](https://blog.wss.com/)

[ProTop](https://blog.wss.com/tag/protop)

# Finding Code: Blocked Sessions

![Mark Bonneville](https://blog.wss.com/hs-fs/hubfs/Mark-Bonneville_NB_900x800.jpg?width=45&name=Mark-Bonneville_NB_900x800.jpg) 

[Mark Bonneville](https://blog.wss.com/author/mark-bonneville)

[Share this blog post on Twitter](https://twitter.com/intent/tweet?text=I+found+this+interesting+blog+post&url=https://blog.wss.com/finding-code-blocked-sessions) [Share this blog post on Facebook](http://www.facebook.com/share.php?u=https://blog.wss.com/finding-code-blocked-sessions) [Share this blog post on LinkedIn](http://www.linkedin.com/shareArticle?mini=true&url=https://blog.wss.com/finding-code-blocked-sessions)

![](https://blog.wss.com/hubfs/wss-article-03-2022-finding-code.png)

#### Blocked sessions are the silent killers of enterprise applications. No one in IT notices there's a problem until the business is seriously affected.

## The ProTop portal can tell you when its happening

By default, the latest version of [ProTop](https://protop.com/) is configured to send blocked session alerts to the ProTop portal.  This can be your first clue that something is amiss in your application code:

![zBlkr alert subjects in the portal](https://blog.wss.com/hs-fs/hubfs/image-png-Feb-23-2022-09-24-42-85-PM.png?width=583&name=image-png-Feb-23-2022-09-24-42-85-PM.png)  
If you hover your cursor over the alerts beginning with zBlk... you see additional information that can help zero in on an culprit you may already be hunting:

![hover alert subject in the portal for more information](https://blog.wss.com/hubfs/image-png-Feb-23-2022-10-36-00-86-PM.png)  
This pop-up information is brought to you by the [enhancers in your alert configuration](https://help.wss.com/kb/alert-config#alert-enhancers).  

Here are the default alert definitions that produced the output above:

![zBlk... alert definitions in alert.cfg](https://blog.wss.com/hubfs/image-png-Feb-24-2022-01-38-23-39-PM.png)  
If you do not see these lines in your localized etc/alert.\*.cfg file, [update your version of ProTop](https://help.wss.com/keeping-your-protop-installation-up-to-date) and copy the lines above from the latest default etc/alert.cfg file into your etc/alert.\*.cfg file.  The ProTop agents will automatically read the changes and start monitoring for blocked sessions.

If you are using the [commercial version of ProTop](https://protop.com/) you can also configure the portal to forward these alerts to a list of recipients as an email or a page (and soon via any Webhook enabled application, Slack etc).

## Use ProTop Real-Time to dive deeper

When you see these alerts in the portal, or via email or page, the first thing to do is open ProTop Real-Time (RT) for the site and resource listed, and use the command-key "b" to show Blocked Sessions:

![blocked sessions panel in protop rt](https://blog.wss.com/hubfs/image-png-Feb-24-2022-02-31-25-31-PM.png)This is one of the most useful screens in ProTop as it can provide the user with detailed information on who is blocking whom, on what resource they are blocked, and if there is a chain of processes all blocked by the same user. You can also easily detect deadly embraces (deadlocks) using this panel as well.

## Client statement cache tells all

To get at the culprit code, you need to enable client statement cache (CSC) for the Blocker-Usr# listed in the Blocked Sessions panel, in this case "7", outlined in red above.  You enable it by telling ProTop RT the user number you are interested in.  See the [Set Usr# (#)](https://help.wss.com/kb/set_user) feature of ProTop RT for more information.

Assuming the blocking session is actively talking to the database, it will pick up the request to send its CSC and after a screen refresh or two, you will see the Blocker-StatementCache in the Blocked Sessions panel (outlined in green above). In this case we see the blocker is on line 17 of s2k\_demo/blocker.p.  If you have updated your alert configuration, these details will also be sent to the portal with the blocked session alerts, ready to be examined at your earliest opportunity.

If the CSC data is not being populated, use $DLC/bin/proGetStack on the Device:PID (underlined in yellow above) to generate a protrace file. The protrace file will include the full ABL call stack, including program names and line numbers. Note that the protrace is created in the process' working directory, not the -T directory. To get a protrace file you must be logged on to the same server that the client is connecting from and you must have root or Administrator privileges (for CSC data you only need access to the database with DBA privileges).

## Examine your code

You should now have enough information about your blocked and blocking sessions to launch an investigation into the code. You have the table name (underlined in purple above) and a call stack or at least one procedure name and line number implicated in these blocked sessions. Now its time to have a chat with your development team and share the details!

 

## Blocked sessions need not be a silent  killer

Your users should not be frustrated waiting for data in your database to free up in order to do their jobs. ProTop can tell you when blocked and blocking sessions occur in your database application. It can even guide you right to the problem table and the specific line of code causing the problem!  [Got ProTop?](https://protop.com/)  

 

![Mark Bonneville](https://blog.wss.com/hs-fs/hubfs/Mark-Bonneville_NB_900x800.jpg?width=150&name=Mark-Bonneville_NB_900x800.jpg)

#### Mark Bonneville

[Follow me on LinkedIn](https://www.linkedin.com/in/mark-bonneville-a738b72/)

Mark has been working with Progress since 1989 when he was presented with his first “Progress Test Drive” while working for the US Coast Guard in Washington DC. He knew a good thing when he saw it and joined Progress Technical Support in 1990 where he worked with Adam Backman and other long term proponents of Progress. Since then Mark has swapped back and forth between 4GL development and DBA roles. He has a “penchant for making things work the way they should” and, before joining White Star, enjoyed database and application tuning using ProTop as the Progress DBA Lead at JPMorgan Chase.

### Leave a Comment

## Related Articles

[![](https://blog.wss.com/hubfs/Imported_Blog_Media/young-man-working-from-home-by-computer_35150-1228-1-e1615813085553.jpeg)](https://blog.wss.com/protop-newsletter-march-2021)

### [ProTop Newsletter March 2021](https://blog.wss.com/protop-newsletter-march-2021)

#### Welcome to our monthly ProTop newsletter, where you’ll find out what’s new, tips and tricks and other cool ways to use both the free and commercial versions of ProTop.

![Paul Koufalis](https://blog.wss.com/hs-fs/hubfs/thumbnail_KOUFALIS_NB_900x800.jpg?width=45&name=thumbnail_KOUFALIS_NB_900x800.jpg) 

[Paul Koufalis](https://blog.wss.com/author/paul-koufalis) 

[Read More](https://blog.wss.com/protop-newsletter-march-2021)

[![](https://blog.wss.com/hubfs/Imported_Blog_Media/doctor-6161898_1920-1.jpg)](https://blog.wss.com/protop-newsletter-june-2021)

[Business Continuity](https://blog.wss.com/tag/business-continuity)

### [ProTop Newsletter June 2021](https://blog.wss.com/protop-newsletter-june-2021)

#### Welcome to our monthly ProTop newsletter, where you’ll find out what’s new, tips and tricks and other cool ways to use both the free and commercial versions of ProTop.

![Paul Koufalis](https://blog.wss.com/hs-fs/hubfs/thumbnail_KOUFALIS_NB_900x800.jpg?width=45&name=thumbnail_KOUFALIS_NB_900x800.jpg) 

[Paul Koufalis](https://blog.wss.com/author/paul-koufalis) 

[Read More](https://blog.wss.com/protop-newsletter-june-2021)

![logoWSS\_H (1)](https://blog.wss.com/hs-fs/hubfs/logoWSS_H%20(1).png?width=2240&height=840&name=logoWSS_H%20(1).png)

[![facebook](https://blog.wss.com/hubfs/Imported%20sitepage%20images/facebook.svg)](https://www.facebook.com/whitestarsoftware/) [![linkedin](https://blog.wss.com/hubfs/Imported%20sitepage%20images/linkedin.svg)](https://www.linkedin.com/company/white-star-software-llc/) [![twitter\_logo\_white\_background](https://blog.wss.com/hs-fs/hubfs/twitter_logo_white_background.png?width=24&height=24&name=twitter_logo_white_background.png)](https://twitter.com/oeDBA)

#### Quick links

- [About us](https://wss.com/about-us)
- [Our blog](https://blog.wss.com/)
- [Support](https://wss.com/progress-openedge-dba-support-with-dbappraise)
- [Consulting](https://wss.com/progress-openedge-consulting)
- [Our publications](https://wss.com/publications)
- [Privacy policy](https://www.iubenda.com/privacy-policy/71755427)
- [Cookie policy](https://www.iubenda.com/privacy-policy/71755427/cookie-policy)

#### Contact us

![](https://blog.wss.com/hs-fs/hubfs/%EF%A1%B9.png?width=18&height=18&name=%EF%A1%B9.png)- +1 833 4PROTOP
![](https://blog.wss.com/hs-fs/hubfs/%EF%83%A0.png?width=18&height=14&name=%EF%83%A0.png)- info@wss.com
![-1](https://blog.wss.com/hs-fs/hubfs/%EF%83%A0-1.png?width=18&height=14&name=%EF%83%A0-1.png)- Contact an expert

Copyright © 2026 White Star Software. All rights reserved - [Website by Falia](https://falia.co/en/)