Troubleshooting
Common issues and solutions when using CloudStorageORM.
Connection issues
Azure: "UseDevelopmentStorage=true" not working
Error: System.InvalidOperationException: No valid combination of account information found.
Cause: Azurite is not running.
Solution:
docker run -d -p 10000:10000 -p 10001:10001 -p 10002:10002 \
mcr.microsoft.com/azure-storage/azurite:latest \
azurite --blobHost 0.0.0.0 --skipApiVersionCheck
AWS: Connection timeout
Error: EndpointConnectionException: Unable to connect to the endpoint...
Cause: LocalStack is not running or service URL is incorrect.
Solution:
docker run -d -p 4566:4566 \
-e SERVICES=s3 \
localstack/localstack:3
# Verify connection
aws s3 ls --endpoint-url=http://127.0.0.1:4566
Invalid credentials
Error: UnauthorizedAccessException or AccessDeniedException
Solution:
- Verify credentials are correct
- For Azure: check connection string format
- For AWS: ensure IAM permissions include s3:*, and try with test/test credentials in local environments
- Check that the container/bucket exists
Query issues
"LINQ query evaluation failed"
Cause: CloudStorageORM cannot evaluate a complex LINQ expression directly.
Solution:
- Move complex logic to post-materialization filtering:
// ❌ Won't work var users = await context.Users .Where(u => u.Email.Contains("@example.com")) .ToListAsync(); // ✅ Use in-memory filtering var users = await context.Users.ToListAsync(); var filtered = users .Where(u => u.Email.Contains("@example.com")) .ToList();
No results from range queries
Cause: String comparison for IDs may not behave as expected.
Solution: Ensure IDs are comparable. If using guids/strings, consider:
// Use precise ID filtering
var user = await context.Users
.FirstOrDefaultAsync(u => u.Id == exactId);
// For range queries, ensure comparable format
var users = await context.Users
.Where(u => u.Id.CompareTo("100") > 0 && u.Id.CompareTo("200") < 0)
.ToListAsync();
Transaction issues
"Transaction already active"
Error: InvalidOperationException: A transaction is already active...
Cause: Trying to begin a transaction when one is already in progress.
Solution: Ensure you dispose or commit/rollback the previous transaction first.
"Manifest not found" during recovery
Cause: Transaction state corruption or incomplete recovery.
Solution: This is rare. If it occurs:
- Check storage access logs
- Verify the transaction manifest files exist under
__cloudstorageorm/tx/ - Consider clearing failed manifests if they are orphaned
Concurrency issues
DbUpdateConcurrencyException on every update
Cause: ETag concurrency is enabled but entities are never retrieved with ETags properly set.
Solution:
Verify you're querying before updating:
var user = await context.Users.FirstOrDefaultAsync(u => u.Id == "123"); user.Name = "Updated"; await context.SaveChangesAsync(); // ETag should be validDo not manually set ETag; let CloudStorageORM manage it
"Conflict detected" errors in production
Cause: High contention on frequently updated entities.
Solution:
- Implement conflict resolution (see Concurrency guide)
- Consider reducing update frequency
- Consider cache-aside patterns for read-heavy workloads
Performance issues
Slow queries on large datasets
Cause: All results are materialized in memory.
Solution:
Prefer primary-key predicates when possible (non-key filters still materialize then filter):
// ❌ Slow: fetch all var users = (await context.Users.ToListAsync()) .Where(u => u.Status == "Active"); // ⚠️ Same non-key behavior here today (materialize + in-memory filter) var users = await context.Users .Where(u => u.Status == "Active") .ToListAsync();Use range queries on primary keys for pagination
Consider batch operations for bulk updates
Validation errors
"Blob/object is too large"
Cause: Entity serializes to JSON larger than cloud storage limits.
Solution:
- Reduce entity size: split into multiple entities
- Compress data before storage (if supported by domain logic)
- Store large fields separately
Getting help
If you encounter issues not covered here:
- Check the GitHub Issues
- Review API reference for detailed type info
- Open a Discussion
- Report bugs with reproduction steps