Hi PK-19081351-0,
The performance issue you're experiencing after upgrading to Business Central v26 On-Prem—specifically the slow initial login and re-authentication—is a known concern that others have also reported. Here's a summary of findings and suggestions based on recent community feedback and Microsoft documentation:
🔍 Observed Behavior
- Initial login takes 2.5+ minutes, but subsequent interactions are fast.
- Manual logout/login is fast, while automatic re-authentication after timeout is slow.
- WebClient logs show cache-related warnings:
"Cache Key does not exist"
and "Tried to remove missing cache for key"
.
- Middle tier logs show errors from CopilotAPI, even though Copilot may not be actively used.
✅ Recommended Actions
1. Regenerate customconfig.json
Several users resolved similar issues by recreating the customconfig.json
file for the server instance and only reapplying necessary values. This helped reduce the delay after server restarts [1].
2. Disable Unused AI Features
Disabling unused AI features (e.g., Copilot, Bank Reconciliation AI) significantly improved performance for some setups [1]. You can do this via the Feature Management page or by adjusting the Copilot & Agent Capabilities
settings [2].
3. Check OnCompanyOpen
Triggers
Heavy logic in the OnCompanyOpen
trigger can slow down session initialization. Review any custom code or extensions that may be executing during login [3].
Microsoft recommends using the In-Client Performance Profiler to capture and analyze slow scenarios. This tool helps identify which extensions or objects are contributing to delays [3].
5. Telemetry and SQL Analysis
Enable verbose telemetry and review Database Wait Statistics and Missing Indexes to identify backend bottlenecks [3].
6. CopilotAPI Error
If you're not actively using Copilot, consider disabling it entirely. Errors from CopilotAPI during login may indicate misconfigured or unnecessary features that can be safely turned off [2].
🧪 Additional Suggestions
- Try a clean middle tier instance with minimal extensions.
- Test login performance with different user roles to isolate permission-related delays.
- Monitor SQL server performance during login to rule out database-side latency.
Let me know if you'd like help crafting a script to reset the config or disable specific features.
Thanks and best regards,
Daniele
Note: This response was prepared with support from Copilot to ensure clarity and completeness.
[1]: Dynamics Community Forum
[3]: Microsoft Learn - Performance Troubleshooting
[2]: Copilot Troubleshooting Guide