Self-hosted update to 2026.4.1 caused SQL stored procedure/schema inconsistencies until manual recompilation
Author: scottmangiapaneCreated May 15, 2026Updated Jun 6, 2026
Labelsbug
Steps To Reproduce
- Run official Bitwarden self-hosted update commands:
./bitwarden.sh updateself
./bitwarden.sh update
./bitwarden.sh rebuild
./bitwarden.sh restart- Verify containers report healthy.
- Attempt login and/or vault operations.
- Observe failures in
bitwarden-apiandbitwarden-identitylogs.
Expected Result
After updating, all Bitwarden services should function normally without requiring manual SQL Server intervention.
Database schema migrations and stored procedure recompilation should complete automatically during upgrade.
Actual Result
Bitwarden became partially unusable after update.
Observed errors included:
Procedure or function CipherDetails_Create has too many arguments specified.The definition of object 'User_ReadKdfByEmail' has changed since it was compiled.Additional deadlock errors also appeared in bitwarden-api logs afterward.
Login and vault operations failed until manual SQL Server recompilation steps were performed.
Issue was resolved only after manually running:
EXEC sp_recompile 'User_ReadKdfByEmail';
EXEC sp_recompile 'CipherDetails_Create';
EXEC sp_updatestats;
EXEC sp_MSforeachtable 'EXEC sp_recompile ''?'''followed by:
./bitwarden.sh restartScreenshots or Videos
No response
Additional Context
- All containers reported healthy despite the issue.
- Backend containers were on
2026.4.1. webcontainer updated to2026.4.2.- This appears related to stale SQL Server procedure metadata or incomplete recompilation after schema migration.
- No manual database modifications were made before the issue occurred.
- Problem appeared immediately after running the official update workflow.
Build Version
2026.4.1
Environment
Self-Hosted
Environment Details
- Operating system: Arch Linux
- Environment: Docker
- Hardware: https://pcpartpicker.com/user/scottmangiapane/saved/#view=cVbbwP
Issue Tracking Info
- I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
Source: bitwarden/server