---
id: post/demiliani-com/13961
type: post
title: "Dynamics 365 Business Central: the mistery around the “Parallel Session Management” codeunit."
summary: Codeunit 490 (Parallel Session Management) is an on-premises job scheduler that fans work across multiple sessions using polling and shared memory, but its design assumptions about blocking sessions, OS-level memory sharing, and single-node architecture make it unsuitable for multi-tenant SaaS environments where Job Queue entries and async patterns are the recommended alternative.
tier: community
language: en
tags:
  - on-premises
  - saas
  - session management
  - job scheduling
  - background processing
  - codeunit design
  - multi-tenant isolation
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:54:27.659Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: c69d32375bd6dd96254e0228a9302cf2a2a1de44db76e9c5972a027fd84ab347
evidence:
  - kind: blog
    url: https://demiliani.com/2026/07/13/dynamics-365-business-central-the-mistery-around-the-parallel-session-management-codeunit/
    title: "Dynamics 365 Business Central: the mistery around the “Parallel Session Management” codeunit."
    date: "2026-07-13"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/490
    - object/codeunit/491
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "13961"
source_id: demiliani-com
source_name: Stefano Demiliani
url: https://demiliani.com/2026/07/13/dynamics-365-business-central-the-mistery-around-the-parallel-session-management-codeunit/
published_at: "2026-07-13T08:31:04.000Z"
author: Stefano Demiliani
full_text: false
words: 853
quotes: []
code_objects_mentioned:
  - codeunit Parallel Session Management
  - codeunit Memory Mapped File
systems:
  - platform
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://demiliani.com/2026/07/13/dynamics-365-business-central-the-mistery-around-the-parallel-session-management-codeunit/embed/
  image: https://demiliani.com/wp-content/uploads/2026/07/palallelsessionmgt_00.png
  image_alt: null
  image_w: 710
  image_h: 300
  site_name: Stefano Demiliani
  favicon: https://demiliani.com/wp-content/uploads/2022/09/sd_wordpress_logo.png?w=32
  probed_at: "2026-10-07T11:50:28.549Z"
---

# Dynamics 365 Business Central: the mistery around the “Parallel Session Management” codeunit.

[Read the post](https://demiliani.com/2026/07/13/dynamics-365-business-central-the-mistery-around-the-parallel-session-management-codeunit/) · Stefano Demiliani (Stefano Demiliani, MVP) · 2026-07-13 · 853 words · tier community · reviewed (checked by Opus)

> Codeunit 490 (Parallel Session Management) is an on-premises job scheduler that fans work across multiple sessions using polling and shared memory, but its design assumptions about blocking sessions, OS-level memory sharing, and single-node architecture make it unsuitable for multi-tenant SaaS environments where Job Queue entries and async patterns are the recommended alternative.

## Key points

- Codeunit 490 is a manual, in-memory orchestrator using scope OnPrem procedures without async/await or platform-managed queues, with entry points like NewSessionRunCodeunit that queue jobs in temporary records and start new sessions via the platform's StartSession, throttled at 10 sessions by default
- The codeunit relies on three design assumptions that work on-premises but fail in SaaS: blocking wait patterns occupy shared sessions against governance policies, OS-level memory-mapped files violate multi-tenant data isolation boundaries, and single-node scoping with ServiceInstanceId() polling breaks across distributed load-balanced nodes
- WaitForAllToFinish can block a session for up to 3600 seconds polling ActiveSession every 2 seconds, which wastes shared metered resources in cloud environments and conflicts with session timeout policies
- NewSessionRunCodeunitWithBlob uses shared memory segments to pass TempBlob data between sessions since they cannot share memory directly, a technique incompatible with multi-tenant isolation where customers must never access each other's data

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 490 "Parallel Session Management"](../../objects/codeunit/490.md)
- [codeunit 491 "Memory Mapped File"](../../objects/codeunit/491.md)

## Context

- Features: parallel session management, job scheduling, background task execution, session polling, memory-mapped file data transfer, multi-session orchestration

Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
