web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Using production copy database unable to publish code in onprem business central

(1) ShareShare
ReportReport
Posted on by 282
I have 2 databases in my development server when i switch to Demodatabase the code is publishing easily but when i switched to the database that is copy of production server database after restarting the business central its publishing the code but the second time its not publishing after doing some research i got know that due to database size some sql process are stuck in the backend due to which the publishing process to onprem business central is stuck so guide me what can i do 
 
DARLiveBK is the production server database copy that is not letting me publish the code
 
 
this is the database memory information and below is the research problem
 
 
while using the DARLiveBK database these are the process that are stuck that seems to be the problem causing to publish the code
 
 
 
I have the same question (0)
  • Suggested answer
    Assisted by AI
    OussamaSabbouh Profile Picture
    9,249 on at
    Hello,
     
    Your issue is caused by SQL Server memory pressure on a small (7 GB RAM) dev server when using a prod-sized database copy: during extension publish, SQL needs large memory grants, hits RESOURCE_SEMAPHORE, and publish gets stuck after the first run. The root problem is SQL max memory set to unlimited, which starves either SQL or the Business Central service tier over time. Fix this by limiting SQL max server memory to ~4–5 GB, restarting SQL, and ideally increasing server RAM to 16 GB+. Also stop Job Queue/users during publish, and if needed temporarily set the DB to SINGLE_USER WITH ROLLBACK IMMEDIATE to clear blocking. After restoring prod DBs, always update statistics and check tempdb, as bad stats + large DBs worsen memory grants. This is a capacity issue, not a BC bug.
     
    Regards,
    Oussama Sabbouh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,957

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,245

#3
YUN ZHU Profile Picture

YUN ZHU 1,045 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans