Home >Backend Development >C++ >Why Does Large File Upload in One Shared-Session Web Application Block Another?
Shared Session Locking in Web Applications: A Case Study
Two IIS-deployed web applications, /HRMS and /TravelDesk, utilize AspState for shared session management, allowing users to seamlessly transition between them. However, a significant performance bottleneck arises when a user uploads large files in /TravelDesk; /HRMS becomes unresponsive during this process.
Root Cause: Session Locking
The problem stems from the shared session's behavior. Large file uploads in /TravelDesk lock the user's session data within the SQL Server database. This lock prevents concurrent access by /HRMS, leading to application freezes.
Resolution: Disabling Session Locking During Uploads
The most straightforward solution involves disabling session locking specifically during the file upload process in /TravelDesk. This can be implemented by setting EnableSessionState="false"
within the page directive or handler responsible for the upload.
Alternative Solutions: Beyond Shared Sessions
For improved scalability and to eliminate session locking entirely, consider these alternatives to shared session management:
By implementing either the session disabling technique or migrating to a database-driven session approach, seamless navigation between /HRMS and /TravelDesk can be restored, even during large file uploads.
The above is the detailed content of Why Does Large File Upload in One Shared-Session Web Application Block Another?. For more information, please follow other related articles on the PHP Chinese website!